Project

General

Profile

Backport #8608

Inconsistent parse of DateTime zone specification with seconds

Added by teleological (Riley Lynch) about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
[ruby-core:55831]

Description

When a time zone specification has a single-digit hour and includes minutes and seconds without colons, the minutes offset is overwritten by the seconds offset. In this example +3:30 is incorrectly parsed as +3:00:

DateTime.parse('6 Nov 1973 18:45 +33000') # => #

This defect is not present when the hour is specified by two digits:

DateTime.parse('7 Nov 1973 04:00 +124500') # => #

Attached is a patch which corrects this issue.


Files

tz_sec.patch (439 Bytes) tz_sec.patch Patch for trunk@41825 (c51615963) teleological (Riley Lynch), 07/08/2013 12:31 AM

Also available in: Atom PDF