Project

General

Profile

Bug #9742

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

Added by Sreekanth Simhadri over 2 years ago. Updated over 2 years ago.

Status:
Third Party's Issue
Priority:
Normal
Assignee:
cruby-windows
ruby -v:
ruby 1.9.3p545 (2014-02-24) [i386-mingw32]
[ruby-core:<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 View - Error Log when Debugging (10.4 KB) Sreekanth Simhadri, 04/14/2014 08:57 PM

History

#1 [ruby-core:62028] Updated by Sreekanth Simhadri over 2 years 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 [ruby-core:62029] Updated by Andrew Vit over 2 years 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 [ruby-core:62280] Updated by Hiroshi SHIBATA over 2 years ago

  • Status changed from Open to Closed

#4 [ruby-core:62306] Updated by Nobuyoshi Nakada over 2 years ago

Ask debugger gem developers.

#5 [ruby-core:63515] Updated by Usaku NAKAMURA over 2 years ago

  • Status changed from Closed to Third Party's Issue

Also available in: Atom PDF