Open oetiker opened 12 years ago
[oetiker] environment variables are local to a process ... but obviously visible from all threads ... google for tzset and thread safe ... it seems that this is not really well explored territory. It seems to me that using multiple timezones in a mt application is not such a good idea ... but if you know a better way, that is thread safe, by all means, let me know ... or better still, provide patches. (having a --tz=xxx
option would be nice)
the person in #252 was motivated by the problem that a 'day' in rrdtool is always in GMT terms ... the rest of the discussion was more about his not understanding that there is no rrdtool 'process' when using language bindings ...
I want to ask to to implement this feature.
I've seen ticket #252 and why it was closed. But I see problem from other side, I'm using ruby bindings in threaded application, and I need to generate graphs for systems in different timezones and very fast, setting TZ variable is not a problem that is what I'm doing now. But I'm not sure this is a right way.
I'm lucky what my app is using ''Time.now.utc'' time only, but in different cases that could be a problem if I used local time.
All the time changing global TZ variable is not a good idea. I really would like rrd_graph to be thread-safe.