fluffle / sp0rkle

sp0rkle is dead, long live sp0rkle
irc://irc.pl0rt.org/#ed
8 stars 4 forks source link

Try to detect reminders crossing a DST switch and compensate accordingly.. #19

Closed fluffle closed 11 years ago

fluffle commented 11 years ago

[15:14] 18:16 < sp0rkle> aids: Time '3:01' is in the past. [15:14] 18:16 < aids> sp0rkle: remind me dst change at 3:01 am [15:14] 18:16 < sp0rkle> aids: okay, i'll remind you dst change at 04:01:00, Sunday 31 March 2013 [15:14] 18:17 < aids> sp0rkle: remind me dst change at 2:01 am [15:14] 18:17 < sp0rkle> aids: okay, i'll remind you dst change at 03:01:00, Sunday 31 March 2013 [15:14] 18:17 < aids> sp0rkle: remind me dst change at 1:01 am [15:14] 18:17 < sp0rkle> aids: okay, i'll remind you dst change at 02:01:00, Sunday 31 March 2013

^^fix

fluffle commented 11 years ago

Not repeatable. AFAICT:

[18:01] test: remind me dst at 1am March 30th, 2014 [18:01] now = BST (3600), then = BST (3600) [18:01] fluffle: okay, i'll remind you dst at 02:00:00, Sunday 30 March 2014

But this is expected and the way the Go time API deals with the fact that there is no 1am and the entire hour is just not there.

[18:02] test: remind me dst at 2am March 30th, 2014 [18:02] now = BST (3600), then = BST (3600) [18:02] fluffle: okay, i'll remind you dst at 02:00:00, Sunday 30 March 2014 [18:02] test: remind me dst at 00:59am March 30th, 2014 [18:02] now = BST (3600), then = GMT (0) [18:02] fluffle: okay, i'll remind you dst at 00:59:00, Sunday 30 March 2014 [18:03] test: remind me dst at 01:59am March 30th, 2014 [18:03] now = BST (3600), then = BST (3600) [18:03] fluffle: okay, i'll remind you dst at 02:59:00, Sunday 30 March 2014 [18:04] test: remind me dst at 02:59 March 30th, 2014 [18:04] now = BST (3600), then = BST (3600) [18:04] fluffle: okay, i'll remind you dst at 02:59:00, Sunday 30 March 2014