Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix wrong timestamp #917

Closed
wants to merge 1 commit into from
Closed

Conversation

hamano
Copy link
Contributor

@hamano hamano commented Jan 22, 2016

ISO 8601 define basic format:
YYYYMMDDTHHmmss
and extended format:
YYYY-MM-DDTHH:mm:ss

but jlib:timestamp_to_iso() makes:
YYYYMMDDTHH:mm:ss

https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations

Either basic or extended formats may be used, but both date and time must use the same format.

If you hate the change, It's a good idea that we make new functions timestamp_to_iso_basic() and timestamp_to_iso_extended().
Thank you.

@prefiks
Copy link
Member

prefiks commented Jan 22, 2016

We have 1 and 2 argument version of this function and both do something different (2 argument version formats time stamp as defined in http://www.xmpp.org/extensions/xep-0082.html while version converts to older time stamp format as defined in http://xmpp.org/extensions/xep-0091.html). Switching name of 1 argument version to for example timestamp_to_legacy_timestamp would probably be not that bad idea, but we still need both of those versions.

Additionally i think we can't remove those '-' and ':' from 2 argument version, per xep-0082 only variation that have those is correct.

So i can't accept this pull request, but if you would want to do that 1 argument version rename, i would gladly accept it.

@hamano
Copy link
Contributor Author

hamano commented Jan 23, 2016

OK, I didn't see thir XEP.
I'll rename timestamp_to_iso/1 to timestamp_to_legacy/1 and
add new function timestamp_to_iso_basic/1.
Thank you!

hamano added a commit to hamano/ejabberd that referenced this pull request Jan 23, 2016
hamano added a commit to hamano/ejabberd that referenced this pull request Jan 23, 2016
prefiks added a commit that referenced this pull request Jan 24, 2016
@prefiks prefiks closed this Feb 4, 2016
@lock
Copy link

lock bot commented Jun 10, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants