Coder Social home page Coder Social logo

Comments (9)

eddelbuettel avatar eddelbuettel commented on May 28, 2024

First, what version of anytime ? We do not call sysdatectl ...

edd@rob:~/git/anytime(master)$ ag timedatectl           # `ag` is a better recursive grep I use...
edd@rob:~/git/anytime(master)$ 

Second, this may be due to us trying to learn TZ and alternatives. Do you have that set? Can you play with the code in R/init.R?

There is nothing I can do for you as I do not have access to a Google Cloud VM.

from anytime.

eddelbuettel avatar eddelbuettel commented on May 28, 2024

As on my box timedatectl comes back immediately, please try on that box the simpler (command-line)

$ date                                # to see the TZ
$ Rscript -e 'format(Sys.time())'     # same

from anytime.

renkun-ken avatar renkun-ken commented on May 28, 2024

Everything looks normal except calling timedatectl hangs.

$ date
   Tue Jul 28 11:06:16 CST 2020
$ Rscript -e 'format(Sys.time())'
[1] "2020-07-28 11:06:22"

from anytime.

eddelbuettel avatar eddelbuettel commented on May 28, 2024

Please ask Google support and your IT staff. If we learn anything, anytime can try to adjust. So far we have nothing.

You also skipped the initial questions:

  • do you set TZ?
  • does the system have TZ?

In the pre-systemd days I wrote an entire package trying to help guess the TZ: gettz. Do you have it installed? Would it make a difference? It is a Suggests: for anytime.

from anytime.

eddelbuettel avatar eddelbuettel commented on May 28, 2024

Also, maybe run this by hand. For me

edd@rob:~/git/anytime(master)$ timedatectl 
               Local time: Mon 2020-07-27 22:28:23 CDT 
           Universal time: Tue 2020-07-28 03:28:23 UTC 
                 RTC time: Tue 2020-07-28 03:28:23     
                Time zone: America/Chicago (CDT, -0500)
System clock synchronized: yes                         
              NTP service: active                      
          RTC in local TZ: no                          
edd@rob:~/git/anytime(master)$ 

from anytime.

eddelbuettel avatar eddelbuettel commented on May 28, 2024

R calls it, apparently, when it does not know better:

edd@rob:~/svn/r-devel$ ag timedatectl
src/library/base/man/timezones.Rd
213:  \command{timedatectl list-timezones} will list all available time zone
289:    things).  There is a command \command{timedatectl} to give details.

src/library/base/R/datetime.R
89:    ## First try timedatectl: should work on any modern Linux
91:    if (nzchar(Sys.which("timedatectl"))) {
92:        inf <- system("timedatectl", intern = TRUE)
106:                                    sQuote("timedatectl"), sQuote(tz)),

src/library/base/all.R
6083:    ## First try timedatectl: should work on any modern Linux
6085:    if (nzchar(Sys.which("timedatectl"))) {
6086:        inf <- system("timedatectl", intern = TRUE)
6100:                                    sQuote("timedatectl"), sQuote(tz)),
edd@rob:~/svn/r-devel$ 

So this goes back to my initial suggestion: 1) Do you have TZ set? 2) If not, do things change if you do?

from anytime.

eddelbuettel avatar eddelbuettel commented on May 28, 2024

@renkun-ken I definitely want to help fix this but I will need input from you as I don't have access to a system exhibiting this issue.

from anytime.

renkun-ken avatar renkun-ken commented on May 28, 2024

@eddelbuettel Thanks for your detailed suggestions!

The TZ is set on system level before running R scripts and the hanging. However, only one VM has this issue and newly created VMs are all working well.

As the VM is rebooted, everything becomes normal. I guess it is caused by that the system service is down.

from anytime.

eddelbuettel avatar eddelbuettel commented on May 28, 2024

I guess it is caused by that the system service is down.

Phew :) Thanks for reporting back!

from anytime.

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.