Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
のテーブルがありますGMT timezone。今、私は異なるタイムゾーンから結果を取得する必要があります。
GMT timezone
日付を検索04-02-2013 すると、すべての結果がGMTになり、特定のタイムゾーンに変換した後、05-02-2013.
04-02-2013
05-02-2013.
それで。04-02-2013特定のタイムゾーンの正確な日付の結果が必要です。たとえば、+5:30offset。(つまり、between GMT +5:30 and -5:30)
+5:30
GMT +5:30 and -5:30
mysqlでの書き込み方法。
試す:
SELECT CONVERT_TZ(datefield,'US/Eastern','US/Central');
見つかった場所:MySQL CONVERT_TZ()
mysql公式ウェブサイトのこのページを確認してください
http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_convert-tz