Comments (9)
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.
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.
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.
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.
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.
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.
@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.
@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.
I guess it is caused by that the system service is down.
Phew :) Thanks for reporting back!
from anytime.
Related Issues (20)
- Time is silently scrubbed when using certain string date time formats HOT 3
- Add argument for default MM/DD to add to just YYYY inputs HOT 1
- timedatectl problem on HPC? HOT 2
- month year specification HOT 7
- Could anydate support nanotime ? HOT 4
- Returning NA value HOT 3
- Feature requests: more flexibly find date substring in a non-date string; and process additional incomplete date substrings HOT 11
- European vs US date formats HOT 3
- Feature request: function to return which format was recognized. HOT 3
- Anytime errors with length 1 NA HOT 6
- Chinese date format suggestion HOT 3
- just yyyy-mm-dd hh:mm:ss but not AEST suffix HOT 5
- anytime() sometimes returns the wrong date HOT 2
- Inconsistent handling of vectors with unknown values HOT 1
- Trivial conversion to NA HOT 1
- time is always one-hour early HOT 3
- Warn for NA's caused by `anydate()` HOT 12
- `"30081993"` is not understood by `"%d%m%Y"` HOT 2
- Question on the performance of `anydate()` HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anytime.