Giter Site home page Giter Site logo

Wrong timezone? about doks HOT 5 CLOSED

digitalocean avatar digitalocean commented on May 26, 2024
Wrong timezone?

from doks.

Comments (5)

timoreimann avatar timoreimann commented on May 26, 2024 1

Does that mean, that in order to run 12:00 in my Berlin time i need to specify 10:00 in my cronjob?

That's correct: as the clusters run on UTC, you will need to subtract 2 hours from your local Berlin / CEST time when considering what time you need to pass to kubectl.

Or is it just kubectl displaying wrong time calculation and the job was actually executed as scheduled?

I couldn't spot a wrongly displayed calculation by kubectl. As long as you keep thinking in UTC, things should be correct.

from doks.

mishushakov avatar mishushakov commented on May 26, 2024

So, here my cronjob triggered 2 hrs later:

Screenshot 2019-08-01 at 14 30 04

The time is UTC, right?

from doks.

timoreimann avatar timoreimann commented on May 26, 2024

Yes, the time is UTC.

It looks correct to me: this is what I get when I kubectl get your dialogflow-gateway-reporter cronjob right now:

NAME                          SCHEDULE     SUSPEND   ACTIVE   LAST SCHEDULE   AGE
dialogflow-gateway-reporter   0 12 1 * *   False     0        7h36m           9h

And this is the time I end up with if I subtract those 7h36m from now:

$ date -u -d "- 7 hours - 36 mins"
Thu Aug  1 12:00:42 UTC 2019

I'm guessing your local machine isn't configured to UTC but CET?

from doks.

mishushakov avatar mishushakov commented on May 26, 2024

Hey @timoreimann ✌️
I feel completely stupid now...

So, this is the time setting on my computer:

Screenshot 2019-08-02 at 12 16 47

This is the output of date and date -u command on my local machine and alpine pod:

Screenshot 2019-08-02 at 18 10 07

the time on my wrist is 18:xx

Does that mean, that in order to run 12:00 in my Berlin time i need to specify 10:00 in my cronjob?
Or is it just kubectl displaying wrong time calculation and the job was actually executed as scheduled?

Thanks.

from doks.

mishushakov avatar mishushakov commented on May 26, 2024

👍

from doks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.