Login Page - Create Account

Support Board


Date/Time: Sun, 04 Dec 2022 23:00:59 +0000



[Programming Help] - GetChartTimeZone() string

View Count: 148

[2022-07-07 03:10:41]
User660727 - Posts: 47
Currently, GetChartTimeZone() returns a non-standard time zone string.
For example, when the user selects "Chicago (-6 CST/-5 CDT)", it returns "CST-06CDT+01,M3.2.0/02:00,M11.1.0/02:00"
I'm struggling to convert this to a useful value that I can use with std::chrono.

Is there a way to get something I could convert to a std::chrono::time_zone name? Any of these would work:
- a TimeZonesEnum enum value
- or the time zone the user selected ("Chicago")
- or a std::chrono::time_zone name ("America/Chicago")?
[2022-07-07 07:19:02]
User431178 - Posts: 161
Is there a way to get something I could convert to a std::chrono::time_zone name? Any of these would work:
- a TimeZonesEnum enum value

GetTimeZoneFromPosixString (found in scconstants.h) returns TimeZonesEnum
[2022-10-03 00:09:54]
User660727 - Posts: 47
Perfect, thanks for the reply!

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account