ArgumentError: time out of range : local « Time « Ruby






ArgumentError: time out of range


Time.local(1865, 4, 9)
# ArgumentError: time out of range
Time.local(2100, 1, 1)
# ArgumentError: time out of range

 








Related examples in the same category

1.The Time class allows you to create Time objects based on arbitrary dates:
2.To set a given time, use the local method (mktime is a synonym):
3.The arguments to Time.local are (in order) year, month, date, hour, minutes, seconds. You can also call local with these arguments:
4.Create Time.local