Open da-head0 opened 1 year ago
I believe this has to do with the format you are passing, will take a deeper look, but the following works correctly:
arrow.get('2020-01-01T02:03:01', tzinfo='Asia/Seoul')
<Arrow [2020-01-01T02:03:01+09:00]>
That is actually some strange behavior, I will need to dig deeper to see what can be done.
Odd one for sure. Add year and it'll work.
end_time_as_cron = '2020 1 10 4 3 [*]' # linux cron expression
arrow.get(end_time_as_cron, 'YYYY m H D M [*]', tzinfo='Asia/Seoul')
<Arrow [2020-03-04T10:01:00+09:00]>
edit
The plot thickens. I can only reproduce with Asia/Seoul
>>> end_time_as_cron = '1 10 4 3' # linux cron expression
>>> arrow.get(end_time_as_cron, 'm H D M', tzinfo='America/Los_Angeles')
<Arrow [0001-03-04T10:01:00-08:00]>
>>> arrow.get(end_time_as_cron, 'm H D M', tzinfo='Asia/Seoul')
<Arrow [0001-03-04T10:01:00+08:27:52]>
>>> arrow.get(end_time_as_cron, 'm H D M', tzinfo='Europe/Vienna')
<Arrow [0001-03-04T10:01:00+01:00]>
>>>
Datetime.datetime has the same behavior
>>> datetime.datetime(
1, 2, 2, 12, 30, 45, 999999, tzinfo=pytz.timezone("Asia/Seoul")
)
datetime.datetime(1, 2, 2, 12, 30, 45, 999999, tzinfo=<DstTzInfo 'Asia/Seoul' LMT+8:28:00 STD>)
Found it. It's hinted in that datetime response. LMT
which explains why using a more recent year "fixes" it. https://blog.qax.io/pytz-and-strange-timezones/
https://en.wikipedia.org/wiki/Local_mean_time
Issue Description
when I add tzinfo as
the result is
The timezone is not +09:00.
System Info
Thanks in advance.