date_time icon indicating copy to clipboard operation
date_time copied to clipboard

Add a way to create a time zone that is set on the system

Open Lastique opened this issue 2 years ago • 1 comments

Please, provide a way to create a time zone object (presumably, posix_time_zone) that corresponds to whatever time zone is set on the current system. Essentially, I need a way to produce formatted date/time strings that include the current time zone information.

This has been requested here.

Lastique avatar Jun 07 '23 16:06 Lastique

One possible way to do this is, I think, to use strftime with %z or %Z to obtain zone information and then parse it back into Boost.DateTime's posix_time_zone. This doesn't provide DST information, though.

Lastique avatar Jul 02 '23 11:07 Lastique