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

time issue #37

Closed
ghost opened this issue May 19, 2015 · 6 comments
Closed

time issue #37

ghost opened this issue May 19, 2015 · 6 comments

Comments

@ghost
Copy link

ghost commented May 19, 2015

I pulled the latest code and deployed it to heroku, I submitted a new post but the time was a little wrong. I posted my post at 6:45 AM but it displays 10:45AM. I don't know if this is set for your time but can you confirm? @9uuso

@jhvst
Copy link
Owner

jhvst commented May 19, 2015

Post creation time is an UNIX timestamp. The database driver declares it as such: databases/gorm/posts.go#L53

This formatted time is controlled by main.go#L72-L74

What this means is that the time is most likely taken from the Heroku's server time, which seem to be the time of Ireland.

If you can confirm that the time difference between you and Ireland is 4 hours, I could take a further look into the bug.

@jhvst jhvst added the bug label May 19, 2015
@ghost
Copy link
Author

ghost commented May 19, 2015

@9uuso yeah, theres a 5 hour difference

@jhvst
Copy link
Owner

jhvst commented Jun 24, 2015

As far as I know, there is no way to feed the server your current time without using JS. I have to figure if I need to implement a select option to choose your timezone.

@ghost
Copy link
Author

ghost commented Jun 24, 2015

@9uuso well if the select option is the simplest way to do this then I guess that it doesn't sound bad, 👍

@jayrox
Copy link
Collaborator

jayrox commented Jun 25, 2015

a timezone select option is probably the best option. just dont forget to
keep the timezone data stored as utc

On Wed, Jun 24, 2015 at 1:02 PM, My-khael Pierce notifications@github.com
wrote:

@9uuso https://github.com/9uuso well if the select option is the
simplest way to do this then I guess that it doesn't sound bad, [image:
👍]


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

@jhvst
Copy link
Owner

jhvst commented Jul 11, 2015

branches merged

@jhvst jhvst closed this as completed Jul 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants