develooper Front page | perl.datetime | Postings from July 2017

Re: How to tell (in advance) if a date-time is ambiguous?

Thread Previous | Thread Next
From:
Binarus
Date:
July 12, 2017 14:23
Subject:
Re: How to tell (in advance) if a date-time is ambiguous?
Message ID:
f2ce5657-218d-d5f7-8de6-e7965884bf5d@binarus.de
On 12.07.2017 14:22, Zefram wrote:
> Binarus wrote:
>> So is there any change to add an according API function to DT:TZ?
> 
> Yes, but we wouldn't want to rush it.  There's more than one
> implementation of the API, and we want to be sure to design it correctly
> the first time.
> 
> Perhaps it could be a ->offsets_for_local_datetime method (note
> plural in the name), which returns a sorted list of all the timezone
> offsets that are applicable to a specified local time.  Normally the
> list would have length 1, the element being the same value returned by
> ->offset_for_local_datetime.  Ambiguous local times (regardless of the
> source of ambiguity) yield more than one offset.  Non-existent local times
> (skipped due to clocks going forward) yield an empty list without error.
> 

That would be absolutely great. Could you please let us know when you
have started working on it? I didn't see a datetime-announce mailing
list yet :-)

(In the meantime, I'll try to work around the problems somehow).

Regards and thank you very much again,

Binarus

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About