b3by / atom-clock

Place a clock or calendar in your status bar
MIT License
96 stars 90 forks source link

Incorrect local time #63

Closed ccjmne closed 5 years ago

ccjmne commented 5 years ago

I've been using this package for a couple of years now, and, while I haven't actually been staring at the time all day every day, I am confident it used to be just fine!

However, today, atom-clock doesn't display my correct local time.
I'm not talking about internationalization, the locale works fine when I change the language, I am not mistakenly looking at the UTC time (which works fine).

I just dropped a Z in my Time format configuration and I can see it believes I'm in a +02:00 timezone. Paris (I'm in France) currently is aligned with GMT+1... perhaps this has to do with Daylight Saving Time?

I just tried it out and Moment does definitely handle my TZ properly.

moment().tz('Europe/Paris').format('hh:mm A Z') // 04:40 PM +01:00

Maybe updating Moment would resolve the issue? Or rather, maybe it's pulling a wrong local time configuration from somewhere...

b3by commented 5 years ago

Thanks for reporting the issue! Unfortunately I couldn't reproduce this issue on my environment. It is possible that the timezone is being whimsical because of the Daylight Saving Time. Could you please report the status of the issue on Sunday (I believe the daylight saving time kicks in tomorrow)? Anyway, I updated the version of moment, so I will release a new version of the package anyway.

ccjmne commented 5 years ago

Thanks! I'll report back on Sunday — when the DST will have kicked in. 🙂

ccjmne commented 5 years ago

Doing my due diligence. 🙂

I checked back today and... nothing has changed, but now that I'm in Summer time, it's perfectly fine. Anyways, I think I'm just gonna close this and let's just... update moment and moment-timezone (maybe just the latter?) once a year or so?

Actually, I see the master branch doesn't seem to be having anything to do w/ TZs... Could the timezone branch be merged in? Is it still a WIP? Would you need some help maintaining this?

Either way, this issue isn't too big a deal anyways! Cheers.

b3by commented 5 years ago

Thanks for reporting back lad. You are right, timezone is not part of the official package yet, it was a WIP some time ago, but I would definitely keep it going. For the moment, I will just update moment, then will start working on a fresh new version of the package. Any help is more than welcome!

ccjmne commented 5 years ago

Sweet! I'll be watching the repo and maybe jump in then :) I am not too confident yet when it comes to all the JS tooling (CI, testing and all...), nor Atom packages (I've only had minor contributions in a couple ones) so I'd rather not be setting stuff up for disaster.

I think I'd like participating in this one though, 'cause it seems both organized and not too overwhelming of a project. Have a nice weekend!