pyphoon icon indicating copy to clipboard operation
pyphoon copied to clipboard

Add timezone option

Open martinbra opened this issue 5 years ago • 5 comments
trafficstars

Created from https://github.com/chubin/wttr.in/issues/56 To correctly show delta time to last and next phase, and the correct phase at the days when there's a phase change, a timezone option is needed.

martinbra avatar Oct 17 '20 20:10 martinbra

A small addition:

Timezone must specified in the standard format understandable by pytz, e.g. Europe/London, to that this could work:

pytz.timezone(tiimezone_description)

It should return a short error message for unknown timezones

chubin avatar Oct 18 '20 16:10 chubin

@chubin : What is your timezone/UTC offset? I'm at America/Sao_Paulo (UTC-03) and it looks like that pyphoon is indeed using my local time when displaying the next moon phases (well, a few minutes off comparing to this site).

>pyphoon 2020-08-20
New Moon +     
1  0:17:44     
First Quarter -
5 14:59:11     

Timezone option added to my branch with a simple display of provided timezone (or UTC by default) if you want to check error messages and/or give suggestions. Timezone is still not being used.

martinbra avatar Oct 19 '20 04:10 martinbra

self-reminder: take a look at negative time at http://wttr.in/moon@2020-08-19

martinbra avatar Oct 26 '20 02:10 martinbra

@martinbra Martin, I am going through old issues: do we have something to do here?

chubin avatar Apr 25 '21 07:04 chubin

Yes we (I) do. I'm sorry to have left this issue frozen. I think something is broken here (just reproduced): image

Do you see the negative time? What could be causing it? As for the timezone option, I know I have advanced something in my fork, but I'm not sure if I pushed everything to github. I'll have a look.

martinbra avatar May 07 '21 13:05 martinbra