Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I have rather lengthy URL that I am using in an application to receive XML data. I'd like to manipulate the time in the URL based on the users time but I don't know how to interpret it.
Here's the date and time from the URL:
2015-04-27T00%3A00%3A00
My Question:
Is there a way to manipulate this to show the current time? For example if I wanted to say that it was 2015-04-27 at 5:30pm CST.
2015-04-27T00%3A00%3A00
apparently is the URL encoded (conforming to RFC 3986) form of
2015-04-27T00:00:00
(%3A
encodes the colon :
).
This, in turn, is the standard ISO 8601 representation for 12:00 AM on April, 27th 2015 UTC.
"2015-04-27 at 5:30pm CST" could hence be represented as
2015-04-27T17:30:00-06:00
in ISO, or
2015-04-27T17%3A30%3A00-06%3A00
in URL encoded format.
–
–
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.