![]() ![]() The offset also accepts string form: DateTime. The default value is zero (equals to UTC). The offset should be -1 to +1, and its precision is assumed at most second. For example, Rational(3,24) represents ahead of 3 hours of UTC, Rational(-5,24) represents behind of 5 hours of UTC. new( 2001, 2, 3.5)Īn optional argument, the offset, indicates the difference between the local time and UTC. The fractional number's precision is assumed at most nanosecond. The last element of day, hour, minute, or second can be a fractional number. A subclass of Date that easily handles date, hour, minute, second, and offset.ĭateTime does not consider any leap seconds, does not track any summer time rules.Ī DateTime object is created with DateTime::new, DateTime::jd, DateTime::ordinal, DateTime::commercial, DateTime::parse, DateTime::strptime, DateTime::now, Time#to_datetime, etc.
0 Comments
Leave a Reply. |