@@ -217,27 +217,21 @@ if (.runThisTest) {
217217 }
218218
219219 test.Datetime.formating <- function () {
220- if (Sys.info()[[" sysname" ]] != " Windows" ) {
221- oldTZ <- Sys.getenv(" TZ" )
222- Sys.setenv(TZ = " America/Chicago" )
223-
224- olddigits <- getOption(" digits.secs" )
225- options(" digits.secs" = 6 )
226-
227- d <- as.POSIXct(" 2016-12-13 14:15:16.123456" )
228- checkEquals(Datetime_format(d ," %Y-%m-%d %H:%M:%S" ),
229- format(d , " %Y-%m-%d %H:%M:%OS" ),
230- msg = " Datetime.formating.default" )
231- checkEquals(Datetime_format(d , " %Y/%m/%d %H:%M:%S" ),
232- format(d , " %Y/%m/%d %H:%M:%OS" ),
233- msg = " Datetime.formating.given.format" )
234- checkEquals(Datetime_ostream(d ),
235- format(d , " %Y-%m-%d %H:%M:%OS" ),
236- msg = " Datetime.formating.ostream" )
237-
238- Sys.setenv(TZ = oldTZ )
239- options(" digits.secs" = olddigits )
240- }
220+ olddigits <- getOption(" digits.secs" )
221+ options(" digits.secs" = 6 )
222+
223+ d <- as.POSIXct(" 2016-12-13 14:15:16.123456" )
224+ checkEquals(Datetime_format(d ," %Y-%m-%d %H:%M:%S" ),
225+ format(d , " %Y-%m-%d %H:%M:%OS" ),
226+ msg = " Datetime.formating.default" )
227+ checkEquals(Datetime_format(d , " %Y/%m/%d %H:%M:%S" ),
228+ format(d , " %Y/%m/%d %H:%M:%OS" ),
229+ msg = " Datetime.formating.given.format" )
230+ checkEquals(Datetime_ostream(d ),
231+ format(d , " %Y-%m-%d %H:%M:%OS" ),
232+ msg = " Datetime.formating.ostream" )
233+
234+ options(" digits.secs" = olddigits )
241235 }
242236
243237
0 commit comments