Time.ascset

Is ther esomething like,

a = Time.ascset(“Thu May 15 15:16:53 2003”) ?

Also, how do I ge tthe epoch time from a time object?

db

···


May 16 First report on SNOBOL distributed (within BTL), 1963
May 17 24" rain in 11 hours, Pearl River, S. China, 1982
May 17 Six SLA members killed in televised gun fight, 1974
May 18 Battle of Las Piedras in Uruguay
May 18 Napoleon crowned Emperor, 1804
May 16 Discovery Day in Cayman Islands
May 17 Constitution Day in Nauru and Norway
May 18 Flag Day in Haiti
May 18 Prayer Day in Denmark
May 18 Rick Wakeman is born in West London, England, 1949
May 17* Armed Forces Day (3rd Saturday of May)
May 16* Omer 49th day
May 17* Erev Shavout
May 18* Shavuot (Festival of Weeks; 50 days after Pesach)
May 18* Yizkor

“Daniel Bretoi” lists@debonair.net wrote in message
news:20030516181605.GM94447@zone.syracuse.net

Is ther esomething like,

a = Time.ascset(“Thu May 15 15:16:53 2003”) ?

You mean this:

a = Time.now.asctime
p a #=> “Fri May 16 17:37:01 2003”

Or this:

require ‘parsedate’
a = ParseDate::parsedate(“Thu May 15 15:16:53 2003”)
a.pop
t = Time.mktime(*a)
p t #=> Thu May 15 15:16:53 Central Daylight Time 2003

I am not sure what you want.

Also, how do I ge tthe epoch time from a time object?

a = Time.at(0)
p a # =>Wed Dec 31 18:00:00 Central Standard Time 1969