zeroclickinfo-goodies icon indicating copy to clipboard operation
zeroclickinfo-goodies copied to clipboard

Calendar: Convert to JS from Perl

Open ghost opened this issue 8 years ago • 3 comments

When searching for the current month's calendar, I get a current date one day ahead of my current local time (Eastern Standard Time). For example, today is Monday, November 20th 2017. When I do the above search, I get a calendar marking November 21st, which looks like this:

novembercalendar-off

I'm not sure how to troubleshoot this, but I imagine it assumes my time zone is set for one ahead of mine, which pushes it into tomorrow.

Thanks!


IA Page: http://duck.co/ia/view/calendar_today Maintainer: @Mailkov

ghost avatar Nov 21 '17 01:11 ghost

@ndegruchy If I remember correctly this is based on the server time which in most situations should be close enough to your timezone. Is it chosing the correct date if you query at the start of the day vs the end of the day?

mintsoft avatar Nov 21 '17 21:11 mintsoft

@mintsoft I don't see any reason to keep with Perl for the date calc here. We can more reliably grab the date via JS. I think this IA should be ported to JS to ensure it's accurate.

moollaza avatar Dec 07 '17 01:12 moollaza

@moollaza sounds perfectly reasonable to me

mintsoft avatar Dec 07 '17 09:12 mintsoft