]> gitweb.factorcode.org Git - factor.git/commitdiff
calendar: fix tests that were breaking in other timezones
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 24 Jan 2022 19:49:04 +0000 (21:49 +0200)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 24 Jan 2022 19:49:04 +0000 (21:49 +0200)
basis/calendar/calendar-tests.factor
basis/calendar/calendar.factor

index a3a5772d89b559dd364e1590979856664e06caba..3b2324eea34ff1e639ea96afb3c35e269796073e 100644 (file)
@@ -231,19 +231,19 @@ IN: calendar
 
 {
     T{ timestamp { year 2019 } { month 11 } { day 4 } }
-} [ 2019 308 year-ordinal>timestamp >gmt midnight ] unit-test
+} [ 2019 308 year-ordinal>timestamp ] unit-test
 
 {
     T{ timestamp { year 2020 } { month 11 } { day 3 } }
-} [ 2020 308 year-ordinal>timestamp >gmt midnight ] unit-test
+} [ 2020 308 year-ordinal>timestamp ] unit-test
 
 {
     T{ timestamp { year 2019 } { month 12 } { day 31 } }
-} [ 2019 365 year-ordinal>timestamp >gmt midnight ] unit-test
+} [ 2019 365 year-ordinal>timestamp ] unit-test
 
 {
     T{ timestamp { year 2020 } { month 12 } { day 31 } }
-} [ 2020 366 year-ordinal>timestamp >gmt midnight ] unit-test
+} [ 2020 366 year-ordinal>timestamp ] unit-test
 
 { t } [
     2020 <year> timestamp>year-dates-gmt
index b41af7955b5c5a2daaf1a5e1fe4351eedf25543c..df7349d65e30a231cf90eec16f31f0bc5808aabd 100644 (file)
@@ -816,7 +816,7 @@ CONSTANT: weekday-offsets { 0 0 1 2 3 4 5 }
 
 : year-ordinal>timestamp ( year ordinal -- timestamp )
     [ 1 1 julian-day-number ] dip
-    + 1 - julian-day-number>date <date> ;
+    + 1 - julian-day-number>date <date-gmt> ;
 
 GENERIC: weeks-in-week-year ( obj -- n )