0

We have a LAMP + Lumen API setup in Ubuntu 14.04 in EC2 US-West Oregon. It is used as an API server.

Server: UTC

MySQL configuration is:

mysql> SELECT @@global.time_zone, @@session.time_zone;
+--------------------+---------------------+
| @@global.time_zone | @@session.time_zone |
+--------------------+---------------------+
| +00:00             | +00:00              |
+--------------------+---------------------+

Other test

mysql> SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP);
+--------------------------------+
| TIMEDIFF(NOW(), UTC_TIMESTAMP) |
+--------------------------------+
| 00:00:00                       |
+--------------------------------+
1 row in set (0.00 sec)

On my.cnf

default_time_zone='+00:00'

Lumen .env configuration

No information about changing timezones

We want to know if we're doing well and if there are other considerations to modify or use a different configuration.

We see this server is not physically in UTC so that's why this came to us.

josuebasurto
  • 531
  • 4
  • 7
  • Actually the purpose of this question is to know if there was some tips about configuration about timezones. And as @dsz requested the question **How to serve correct timestaps and datetimes to clients in different timezones.** – josuebasurto Jan 05 '16 at 16:39
  • You're still being very broad. Why would UTC not be "correct" particularly fire an API server. I request you accept my answer and come back with a new question with a specific scenario with which you can seek help. – dsz Jan 05 '16 at 22:18

1 Answers1

1

Web servers (in fact, most servers) are best configured as UTC, since their clients could be connecting from anywhere in the world. Choosing a time-zone for the display of web pages is frequently done on a per-user or per-session (using GeoIP lookup) basis. Please edit you're question if there is a specific question you're concerned with.

dsz
  • 3,575
  • 30
  • 30