|
|
|
Time zone
|
|||
|---|---|---|---|
|
#18+
Всем привет. Объясните пожалуйста такую вещь. Мое приложение формирует и пытается записать в базу дату в виде: Код: java 1. (Новосибирское время) Когда пишу в локальную базу даты записываются в нужной мне тайм зоне, но когда пишу на удаленный сервер, который находится где-то в Питере, в базе дата представлена в таком виде: Код: java 1. . Если я правильно поняла, мне нужно где-то в настройках mysql прописать Новосибирскую зону, как это сделать? Спасибо :) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.09.2014, 07:39:13 |
|
||
|
Time zone
|
|||
|---|---|---|---|
|
#18+
JulTЕсли я правильно поняла, мне нужно где-то в настройках mysql прописать Новосибирскую зону, как это сделать? http://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html Per-connection time zones. Each client that connects has its own time zone setting, given by the session time_zone variable. Initially, the session variable takes its value from the global time_zone variable, but the client can change its own time zone with this statement: mysql> SET time_zone = timezone; The current session time zone setting affects display and storage of time values that are zone-sensitive. This includes the values displayed by functions such as NOW() or CURTIME(), and values stored in and retrieved from TIMESTAMP columns. Values for TIMESTAMP columns are converted from the current time zone to UTC for storage, and from UTC to the current time zone for retrieval. The current time zone setting does not affect values displayed by functions such as UTC_TIMESTAMP() or values in DATE, TIME, or DATETIME columns. Nor are values in those data types stored in UTC; the time zone applies for them only when converting from TIMESTAMP values. If you want locale-specific arithmetic for DATE, TIME, or DATETIME values, convert them to UTC, perform the arithmetic, and then convert back. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.09.2014, 11:19:44 |
|
||
|
|

start [/forum/topic.php?fid=47&fpage=164&tid=1834288]: |
0ms |
get settings: |
11ms |
get forum list: |
12ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
46ms |
get topic data: |
11ms |
get forum data: |
2ms |
get page messages: |
43ms |
get tp. blocked users: |
1ms |
| others: | 269ms |
| total: | 399ms |

| 0 / 0 |
