method

getlocal

v1_8_7_72 - Show latest stable - Class: Time
getlocal()
public

Returns a new new_time object representing time in local time (using the local time zone in effect for this process).

   t = Time.gm(2000,1,1,20,15,1)   #=> Sat Jan 01 20:15:01 UTC 2000
   t.gmt?                          #=> true
   l = t.getlocal                  #=> Sat Jan 01 14:15:01 CST 2000
   l.gmt?                          #=> false
   t == l                          #=> true