Opened 8 years ago

Closed 5 years ago

#10087 closed Bugs (fixed)

Need to update date_time_zonespec.csv for Moscow

Reported by: Eric C <eric.cyw@…> Owned by: James E. King, III
Milestone: Boost 1.67.0 Component: date_time
Version: Boost 1.55.0 Severity: Problem
Keywords: moscow timezone tz tzdatabase Cc:

Description

Starting in 2011 Russia passed a law to switch to be on daylight savings time permanently.

http://en.wikipedia.org/wiki/Moscow_Time "On 27 March 2011, Muscovites set their clocks forward for a final time, effectively observing MSD, or UTC+4, permanently.

On March 29th, 2014, after the accession of Crimea to the Russian Federation the Republic of Crimea and the city of Sevastopol switched their time to MSK."

---

So all in all, for boost we'll need to replace:

Europe/Moscow MSK MSK MSD MSD +03:00:00 +01:00:00 -1;0;3 +02:00:00 -1;0;10 +03:00:00

With:

Europe/Moscow MSK MSK +04:00:00 +00:00:00 +00:00:00

Attachments (1)

date_time_zonespec.csv (39.2 KB ) - added by John Patterson <jpatterson@…> 7 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 by John Patterson <jpatterson@…>, 7 years ago

I actually have Moscow as this: Europe/Moscow MSK MSK +03:00:00 +00:00:00 +00:00:00

I don't know if I'm the only one who was getting frustrated by how out of date the date_time_zonespec.csv file was getting, and it seemed like the original authors didn't really intend to be in the perpetual business of maintaining this. From boost/date_time/tz_db_base.hpp:

/*! The csv file containing the zone_specs used by the

  • tz_db_base is intended to be customized by the
  • library user. When customizing this file (or creating your own) the
  • file must follow a specific format.

So, fair enough. But I still need an up to date database. Turns out the Python pytz library is well maintained, and updates pretty much in lockstep with IANA time region changes. I've written a Python routine that emits the csv file using whatever version of pytz that's installed. If anyone is using this, I'd be happy to contribute the code. Or maybe I'm the only lunatic using this.

by John Patterson <jpatterson@…>, 7 years ago

Attachment: date_time_zonespec.csv added

comment:2 by John Patterson <jpatterson@…>, 7 years ago

Attached the file I generated using the 2015b version of the Olsen database in the Python pytz package.

in reply to:  2 comment:3 by anonymous, 7 years ago

Replying to John Patterson <jpatterson@…>:

Attached the file I generated using the 2015b version of the Olsen database in the Python pytz package.

Is it possible to share the scripts that you used to generate this date_time_zonespec.csv file? The Time Zone Database is still evolving so it would be helpful to have possibility to regenerate it in future.

comment:4 by anonymous, 7 years ago

Here's a little PHP script that does the job. I crosschecked the results and they appear to be okay. There's one known bug mentioned in the code: https://gist.github.com/anonymous/e1776b620768f5a22da4f3bc2749562f

And here's a freshly generated file from the IANA 2016c TZ database: https://gist.github.com/anonymous/7f520506cc4ed0175dd23b427ce461c6

comment:5 by James E. King, III, 5 years ago

Thanks for those links. I have to ask however, whether this file is sufficient. If a region changes their time zone rules, don't we still need to apply the old rules before that cutover and new rules after that cutover? This file format seems insufficient to handle that task.

I will submit a pull request to update boost with the latest generated file.

comment:6 by James E. King, III, 5 years ago

Owner: changed from az_sw_dude to James E. King, III

comment:7 by James E. King, III, 5 years ago

Status: newassigned

comment:8 by James E. King, III, 5 years ago

I added an issue to track my concern above. https://github.com/boostorg/date_time/issues/67

I am going to modify the 2016c database generated file linked above to use the longer names for the fields that had them before, so things don't break.

comment:9 by James E. King, III, 5 years ago

comment:10 by James E. King, III, 5 years ago

Keywords: timezone tz tzdatabase added
Milestone: To Be DeterminedBoost 1.67.0

comment:11 by James E. King, III, 5 years ago

Resolution: fixed
Status: assignedclosed

Fix merged to master; resolved.

Note: See TracTickets for help on using tickets.