[Lazarus] Lazarus 2.0 returning inconsistent formatted results of DateTimeToStr?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Lazarus 2.0 returning inconsistent formatted results of DateTimeToStr?

Free Pascal - Lazarus mailing list
The DateTimeToStr function returns somewhat inconsistent formatted
results, depending on the operating system.

For "DateTimeToStr (now, DefaultFormatSettings)"

-  under Windows 10 (64), I got "12-03-2019 21:35:50"
-  under Linux Mint Sarah, I got "12-3-19 21:35:50"
-  under Raspbian Stretch, i got "12-3-19 21:35:50"

The Language Switch of the IDE, Tools -> Options ... -> General ->
Language, was  set to "German [de]".

-- Joe

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2.0 returning inconsistent formatted results of DateTimeToStr?

Free Pascal - Lazarus mailing list


On Tue, 12 Mar 2019, Joe via lazarus wrote:

> The DateTimeToStr function returns somewhat inconsistent formatted
> results, depending on the operating system.
>
> For "DateTimeToStr (now, DefaultFormatSettings)"
>
> -  under Windows 10 (64), I got "12-03-2019 21:35:50"
> -  under Linux Mint Sarah, I got "12-3-19 21:35:50"
> -  under Raspbian Stretch, i got "12-3-19 21:35:50"
>
> The Language Switch of the IDE, Tools -> Options ... -> General ->
> Language, was  set to "German [de]".
This is normal. The operating system settings are used, not the IDE language
settings.

For Linux OS settings to be initialized correctly, you should add the
'clocale' unit to your program's uses clause.

Michael.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Lazarus 2.0 returning inconsistent formatted results of DateTimeToStr?

Free Pascal - Lazarus mailing list
Am 12.03.2019 um 22:53 schrieb Michael Van Canneyt via lazarus:
> For Linux OS settings to be initialized correctly, you should add the
> 'clocale' unit to your program's uses clause.

Yes, ok now. Thanx, Michael.
--  Joe

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus