Opened 13 years ago
Closed 12 years ago
#3803 closed Support Requests (fixed)
How to use dynamic_local_time_adjustor ?
Reported by: | Owned by: | az_sw_dude | |
---|---|---|---|
Milestone: | Boost 1.42.0 | Component: | date_time |
Version: | Boost 1.41.0 | Severity: | Not Applicable |
Keywords: | Cc: |
Description
I need to convert Localtime value to UTC. LocalTime values are loaded at runtime, so i am not able to use static_local_time_adjustor class.
Seems like dynamic_local_time_adjustor is designed for this goal. But how to use it ?
Change History (2)
comment:1 by , 13 years ago
Component: | None → date_time |
---|---|
Owner: | set to |
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Severity: | Problem → Not Applicable |
Status: | new → closed |
Type: | Bugs → Support Requests |
Note:
See TracTickets
for help on using tickets.
Honestly, I have only a slightest idea. It looks like the class is intended to be used to generate local times that respect DST changes. It seems, its major difference from static_local_time_adjustor is that you can specify the base offset from UTC to your local time in the constructor rather than as a part of template parameters.
In order to use it you can specify the time type and the DST changing policy as its template parameters. The latter can have state and should implement the dst_offset function that will return the DST shift.
If you have further questions, you can try asking on the mailing list. Perhaps someone more experienced will be able to help.