Bug #9742

Error when trying to debug line with "startDate = Time.parse('2014-Apr-01 12:00:30')"

Added by Sreekanth Simhadri about 1 year ago. Updated about 1 year ago.

[ruby-core:<unknown>]
Status:Third Party's Issue
Priority:Normal
Assignee:cruby-windows
ruby -v:ruby 1.9.3p545 (2014-02-24) [i386-mingw32] Backport:2.0.0: UNKNOWN, 2.1: UNKNOWN

Description

Tried debug and parse string which has date and time to Time using below code

Time.parse('2014-Apr-01 12:00:30')

Actual Result: Script failed with error attached errorLog.txt file which was copied from console

Expected Result: Should return Time without any error

errorLog.txt Magnifier - Error Log when Debugging (10.4 KB) Sreekanth Simhadri, 04/14/2014 08:57 PM

History

#1 Updated by Sreekanth Simhadri about 1 year ago

Sreekanth Simhadri wrote:

Tried debug and parse string which has date and time to Time using below code

Time.parse('2014-Apr-01 12:00:30')

Actual Result: Script failed with error attached errorLog.txt file which was copied from console

Expected Result: Should return Time without any error

Resolved the issue by using DateTime.parse('2014-Apr-01 12:00:30').to_time

#2 Updated by Andrew Vit about 1 year ago

There is a stdlib time with the parse feature which is not included in core. You can do:

require 'time'
Time.parse('2014-Apr-01 12:00:30')

#3 Updated by Hiroshi SHIBATA about 1 year ago

  • Status changed from Open to Closed

#4 Updated by Nobuyoshi Nakada about 1 year ago

Ask debugger gem developers.

#5 Updated by Usaku NAKAMURA about 1 year ago

  • Status changed from Closed to Third Party's Issue

Also available in: Atom PDF