The timezone problem

Gervase Markham gerv at
Tue Oct 13 16:14:44 UTC 2009

So I'm looking at trying to solve (as best I can) the timezone problem 
for my API.

I acquire time information from basically two places - the legacy XML 
interface, and the XML-RPC interface. Times that I get from the legacy 
XML interface come with timezone information already, of the +0100 form 
- although this isn't stored in the timestamp itself, but is external. 
So when I ship a database between timezones, all the times change :-/ 
Which is annoying for automated tests which check values of things.

Still, for normal databases which aren't weird like mine, I could add or 
subtract that timezone from the time itself to get the time in UTC. Right?

Then, there remain the times from the XML-RPC interface. If:

1) the API proxy knew (in its config or by asking Bugzilla) the timezone 
and DST rules (as in e.g. "America/Los Angeles") the Bugzilla server was 
in, and

2) if the account using the API hadn't messed with the new "set my 
timezone" pref in 3.4, then:

=> the API could take the times that come back from Bugzilla and, using 
its knowledge of what zone they are actually in, convert them to UTC.

Would that work? Or have I missed something?

dev-apps-bugzilla mailing list
dev-apps-bugzilla at

More information about the developers mailing list