What format of timezone is this, and how would I convert it into a normal timezone?

I am using the IP2Location Database to get a users timezone but have encountered 1 issue. When I get the users timezone it returns this: -05:00. I have no idea what that timezone is and want to know how to convert it into a normal readable time such as: 11:00PM with php. Thanks in advanced.

Answers


Timezones are just telling you the timezome in which the user is, not the actual current time. The service appears to use normal GTM timezones, so you could see more information for it for example from wiki: http://wwp.greenwichmeantime.com/info/timezone.htm

Then, when logging something you propably would know your own current time in the server, and you could also check the timezone for it. And then simply calculate how many hours difference (note that some timezones are actually only 30 minutes off from the next) is to yours, and use that to calculate the users local time value.


Need Your Help

Reverse the string without changing white spaces in java

java regex string

I'm working on reversing the string word by word and making sure that all the spaces, tabs and white spaces character etc. are not changed or removed. I have tried few solution using Java, but endi...

SDN 4 doesn't create relationship with properties

neo4j spring-data-neo4j spring-data-neo4j-4

I am new to Neo4J. I have built a project that uses spring-data-neo4j (4.0.0.BUILD-SNAPSHOT - version), spring-boot (1.2.3.RELEASE - version) and succeeded to create node entities, add properties t...