Kim Alvefur
68867c09d6
util.datetime: Remove a line
...
No idea why the locals were declared on a line by itself. Perhaps line
length considerations? But saving 6 characters in width by adding a
whole line with 47 characters seems excessive.
This is still within the 150 character limit set by .luacheckrc
2022-08-17 18:07:31 +02:00
Kim Alvefur
c85c18b03a
util.datetime: Add support for sub-second precision timestamps
...
Lua since 5.3 raises a fuss when time functions are handed a number with
a fractional part and the underlying C functions are all based on
integer seconds without support for more precision.
2022-08-14 16:57:31 +02:00
Kim Alvefur
968eaf41a8
util.datetime: Make sure timezone difference is calculated correctly ( fixes #1262 )
...
If the two os.date() calls happen at either side of a second ticking
over there would be a one second error in the calculation.
2018-12-09 23:01:47 +01:00
Kim Alvefur
43b814a83b
vairious: Add annotation when an empty environment is set [luacheck]
2018-02-28 20:06:26 +01:00
Matthew Wild
8967760df5
net.websocket.frames, util.datetime, util.json, util.prosodyctl, util.rfc6724: Remove unused variables [luacheck]
2016-03-10 17:52:03 +00:00
Kim Alvefur
eaa823a597
util.*: Remove use of module() function, make all module functions local and return them in a table at the end
2015-02-21 10:36:37 +01:00
Florian Zeitz
1d833bb807
Remove all trailing whitespace
2013-08-09 17:48:21 +02:00
Waqas Hussain
f79f756a44
util.datetime: Fix timestamp parsing pattern.
2012-08-28 05:08:18 +05:00
Matthew Wild
4ff48cecfd
util.datetime: Fix timestamp parsing when in DST (thanks xnyhps)
2011-04-15 22:39:53 +01:00
Matthew Wild
dd86939ca2
util.datetime: Fix so that the timestamp returned is always in UTC, timezone offsets were going in the wrong direction
2010-11-27 01:30:56 +00:00
Matthew Wild
85d3f7707e
util.datetime: Fixes for more liberal timezone parsing - colon and minutes are both (independantly) optional (thanks Zash)
2010-11-27 01:22:43 +00:00
Waqas Hussain
d6cf6f6004
util.datetime: Added implementation for function parse().
2010-08-02 20:11:08 +05:00
Matthew Wild
2bc0606453
Update copyright headers for 2010
2010-03-22 17:06:15 +00:00
Matthew Wild
118883d655
Remove version number from copyright headers
2009-07-10 03:11:45 +01:00
Matthew Wild
5ce49a3b6c
util.datetime: Allow specifying a time to format
2009-03-29 02:14:32 +01:00
Matthew Wild
c80f91dc02
0.3->0.4
2009-03-20 20:16:25 +00:00
Matthew Wild
c5ee166aa9
Update copyright notices for 2009
2009-01-30 17:59:26 +00:00
Matthew Wild
f2d020191f
0.2->0.3
2009-01-30 17:40:25 +00:00
Matthew Wild
bf3b96204d
GPL->MIT!
2009-01-30 17:22:56 +00:00
Matthew Wild
d3ad4a5123
0.1 -> 0.2
2008-12-10 15:44:03 +00:00
Matthew Wild
0c5cc83112
Insert copyright/license headers
2008-12-03 14:39:07 +00:00
Waqas Hussain
5358129300
Added util.datetime: Utility methods to support XEP-0082: XMPP Date and Time Profiles
2008-11-13 12:12:19 +05:00