A
A
Anton2015-07-25 15:34:30
Kohana
Anton, 2015-07-25 15:34:30

How to set correct city time with time zone - kohana 3.1?

Implemented the addition of news on the site, also made a line with time and date.
All this is recorded in the database and the news displays the date and time - when the news was added to the site.
The only problem is that it doesn't show the time correctly.
I'm in bootstrap.php
In the line date_default_timezone_set('Asia/Vladivostok'); set your city, but you also need to make the time zone work, on the computer the clock has the following parameters ((UTC + 10: 00) Vladivostok, Magadan (RTZ 9)), as I understand it, in bootstrap you need to somehow add UTC + 10: 00.
How to implement the correct time?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
entermix, 2015-07-25
@entermix

Store UNIX TIMESTAMP in the database, and display the date on the site using JS, for example, with this JQuery plugin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question