Changes between Version 2 and Version 3 of TimeUtils
- Timestamp:
- 2010-03-16 03:49:10 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TimeUtils
v2 v3 17 17 Returns the number of seconds since the last midnight to the given `time`. If no `time` is given, assumes current time. 18 18 19 '''`timeutils.to_secs (timestring)`''' 20 Converts a string of the form `"hh:mm:ss am|pm"` to the number of seconds. Together with `dayseconds()` it lets you write code of the form: 21 {{{ 22 if timeutils.dayseconds() < timeutils.to_secs ("09:30 pm") then 23 return false 24 end 25 }}} 26 19 27 '''`timeutils.localtoUTC ([time] [, timezone])`''' 20 28 Returns the 'date table' (same as returned by `os.date('*t', time)`) of the UTC time corresponding to the given `time`. If no `time` is given, assumes current time. If no `timezone` is given, assumes Vera's configured timezone.