wttr.in icon indicating copy to clipboard operation
wttr.in copied to clipboard

Timezone for wttr.in/Moon

Open chubin opened this issue 9 years ago • 6 comments

At the moment, wttr.in/Moon show the Moon in the GMT+3 time.

Proposed changes:

  1. Use GMT by default
  2. Switch timezone using additional param:

http://wttr.in/Moon?TZ=EET

chubin avatar Oct 22 '16 17:10 chubin

or

http://wttr.in/moon/london

opt9 avatar Jan 25 '17 04:01 opt9

@martinbra Yet another interesting issue related to the Moon. To fix this we need support for timezone in pyphoon. Something like:

pyphoon -t Europe/London

If this option is supported in pyphoon, we can easily add support to wttr.in:

  • local time for the IP-address
  • switch of timezone from the query
  • switch of the location of the watch from the query as @opt9 proposes (by the way, it is interesting for the hemisphere too)

chubin avatar Oct 15 '20 04:10 chubin

That would be a nice learning project for me! I think that if we add this functionality, we should also add hours and maybe even GMT offset to the call pyphoon 2020-10-09T21:00 (oops it already works: pyphoon 2020-10-09T22:00 shows another phase). I tried without success to parse with "Z+01" and some other formats trying to check if a timezone could be passed, but i still have to check the code...

Should we use GMT or UTC name as standard?

martinbra avatar Oct 16 '20 16:10 martinbra

I believe we already use UTC, and it it the right choice for a internet service like ours.

I think the plan here should be:

  • open a new issue in pyphonn
  • add the new long option (--timezone)
  • make it show the output for the timezone if specified (with an additional message, like for hemispheres)
  • make a PR/merge it
  • activate the feature for wttr.in/Moon

Options to select timezone in the query:

  • wttr.in/Moon?Z (use local time zone)
  • wttr.in/Moon@2010-01-01,London (date and location)
  • wttr.in/Moon?timezone=europe/london (timezone specified explicitly)

I think we want to support all thre

chubin avatar Oct 17 '20 07:10 chubin

https://github.com/chubin/pyphoon/issues/33 created.

martinbra avatar Oct 17 '20 20:10 martinbra

Is this why e.g. today wttr.in is giving me Waxing Gibbous at 62 % illumination, whereas nineplanets.org is giving me ~60 % and timeanddate.com is giving me ~58 %?

It's at the most over 4 % off, depending on who's correct. Would someone be able to explain the discrepancy between these services?

victorz avatar Mar 14 '23 09:03 victorz