linux - Adjust Time to Daylight Saving for localtime C++ -


i have piece of optimized function gmt time. convert local time. want call localtime , gmtime function once adjust time localtime calling localtime , gmtime multiple times defeat purpose of using optimized function. however, problem how adjust localtime when there daylight saving? ideas on that?

thanks.

i've never noticed performance issues fetching time. problem in code?

in case, simplest solution compute offset utc-to-local, , recompute if hour different when offset computed.


Comments

Popular posts from this blog

c++ - Compiling static TagLib 1.6.3 libraries for Windows -

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -

jtree - comparing two TreeNode (or DefaultMutableTreeNode) objects in Java Comparator -