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

how can in fix Timezone of date #54

Closed
jackraj88 opened this issue Nov 2, 2015 · 5 comments
Closed

how can in fix Timezone of date #54

jackraj88 opened this issue Nov 2, 2015 · 5 comments

Comments

@jackraj88
Copy link

Hi,
i am using odb - 1.7.11, phporient - 1.0

In database inserted record Asia/kolkata timezone but using ostico phporient driver retrieve record from database timezone will be differ. how can i fix it.

@smolinari
Copy link

Since ODB doesn't have a clue about time zones, I believe you have to account for timezone differences in your application. Basically, you'd need to save the time according to UTC, then recalculate the time according to the user's own time zone.

http://orientdb.com/docs/2.1/Managing-Dates.html

https://en.wikipedia.org/wiki/Coordinated_Universal_Time

Scott

@andreyvk
Copy link

andreyvk commented Nov 2, 2015

I would usually set server's timezone to UTC so that I know how to quickly
convert from saved date into a date displayed to a client

On Mon, Nov 2, 2015 at 1:09 PM, Scott notifications@github.com wrote:

I believe you have to account for timezone differences in your
application. Basically, you'd need to save the time according to UTC, then
recalculate the time according to the user's own time zone.


Reply to this email directly or view it on GitHub
#54 (comment).

@smolinari
Copy link

Right. That is what I also meant. LOL! Obviously, the clock you get the current time from to save would also need to be set to UTC. 😄

Scott

@Ostico
Copy link
Owner

Ostico commented Nov 8, 2015

Thank you @andreyvk and @smolinari for support. I close.

@Ostico Ostico closed this as completed Nov 8, 2015
@andreyvk
Copy link

andreyvk commented Nov 8, 2015

Anytime @Ostico! ))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants