How do I change MySQL timezone?

1226 ワード

However there エリア ways for あなた ト get レスリング that エリア in ヨール preferred timezone. ファースト determine ホ マンリー ハウス ヨール desired timezone is オフ from MST. For example、 EST is +2 houss. PST is -1 hour.Knowing the 時間 offset あなた can replace all. ヨール SQL statements 保存先  SELECT NOW()with SELECT DATE_ADD(NOW()、 INTERVAL 2 HOUR;which will give あなた an EST ダテ レスリング. For a. レスリング in PST あなた would ド:SELECT DATE_SUB(NOW()、 INTERVAL 1 HOUR;If。 あなた エリア working. with 時間 in seconds. instead 保存先 dates、 then factor in the オフセット in seconds. Because there エリア 3600 seconds. in an hour and EST is 2 ハウス later than MST、 the フォローウイング バージョンアップ timestamps from MST ト EST:SELECT unix_timestamp() + (3600 * 2)SELECT FROMUNIXTIME(UNIX_)TIMESTAMP() + (3600 * 2))See the MySQL Manual Date and Time Funtions for メモリ information.Depending オン ヨール appication、 あなた may also need ト ド one 保存先 the フォローウイング (but not both):1. Find every プレース in ヨール コード where a. ダテ or 時間 is ディsplayed ト the browser and すばらしい a. user defined 機能 change it ト add or subtract the aprisate number 保存先 ハウス before displaying it.2. Find every プレース in ヨール コード where dates or times エリア input イント ヨール system and すばらしい a. user defined 機能 add or subtract the aprisate number 保存先 ハウス before storing it.