[fpc-pascal] Converting date formats

Winfried Bartnick winni at bartnick.info
Sat Oct 3 22:15:39 CEST 2020



Am 03.10.20 um 18:52 schrieb Ryan Joseph via fpc-pascal:
>
>> On Oct 3, 2020, at 10:37 AM, Michael Van Canneyt <michael at freepascal.org> wrote:
>>
>> Do you ever read the documentation ?
>>
>> You might then have read why the above will never work.
>>
>> You probably need this:
>>
>> https://www.freepascal.org/docs-html/current/rtl/dateutils/iso8601todate.html
>>
>> or even this
>>
>> https://www.freepascal.org/docs-html/current/rtl/dateutils/scandatetime.html
>>
>> If you need full timezone handling, then there are no such routines in the
>> RTL. However, there is somewhere a package (I believe it is mentioned in the
>> wiki) that handles timezones and whatnot.
> I have no idea about dates and where to find these functions in the RTL. I just saw the date at https://tools.ietf.org/html/rfc3339.
>
> What do those links say about it not being possible? ISO8601ToDate seems to work if I change the decimal representation of the seconds to an integer.
>
>
> Regards,
> 	Ryan Joseph
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Hi!


Timezones are handled by the package PascalTZ.

It is available through the Online Package Manager.

Winni



More information about the fpc-pascal mailing list