Timezone problem when deployment?

I am in Cambodia/Khmer.
I have a timezone problem when deploying my app to Linode Hosting.
I use Mup to deploy.
(It decreases one day)
Please help me.

The server timezone will always be the one from the server, so unless the server you are deploying to with mup isn’t in Cambodgia then it’s normal.

You have to account for the timezones in your code - there is a lot of documentation on this and your request too general so i’ll point you to google :slight_smile: https://www.google.ro/search?q=javascript+timezones

Hi, has the problem been resolved yet?

Now I don’t need config timezone on deploy.
I need wrap current time in date value on client side before push server method.
And don’t use moment method such as .startOf('day'), .endOf...... on the server side.

Most servers use UTC timezone. In development I always use

$ export TZ=UTC
$ meteor run....

So that my local development server is running in UTC, to match production. This way there are no surprises when I deploy.

Generally all date/times should be in standard Date objects when sent between client/server - never use local times. If your server needs to know your client’s local time then the client can also give the server its value of

new Date().getTimezoneOffset()
1 Like