How to solve time zone warning when submitting batch jobs?

1 vue (au cours des 30 derniers jours)
Junjun
Junjun le 17 Nov 2016
Commenté : Peter Perkins le 18 Nov 2016
Every time when I submit a batch job, for example "job=batch('testme','Pool',31)", I end up with this kind of warning. Is there anyway to fix it, preferably outside matlab so that users don't have to run extra timezone setting code in matlab? I have Matlab R2016b on Ubuntu Linux server.
ID: 32
State: finished
Function: @distcomp.nop
Parent: Job 8
StartDateTime: 17-Nov-2016 14:51:45
Running Duration: 0 days 0h 0m 13s
Error:
Warnings: The system time zone setting, 'US/Eastern', does not specify a single time zone
unambiguously. It will be treated as 'America/New_York'. See the datetime.TimeZone property for
details about specifying time zones.

Réponse acceptée

Walter Roberson
Walter Roberson le 17 Nov 2016
  4 commentaires
Junjun
Junjun le 18 Nov 2016
Modifié(e) : Junjun le 18 Nov 2016
Yes. This solved the issue.
In Linux terminal window, "echo $TZ" shows nothing. Then I did this
jmao@poincare:~$ export TZ=America/New_York
jmao@poincare:~$ echo $TZ
America/New_York
After that I started matlab, and get this
getenv('TZ')
ans =
America/New_York
And the job finished without warning.
Peter Perkins
Peter Perkins le 18 Nov 2016
MATLAB is perhaps a bit stricter about this than other software, but US/Eastern is an old-style specification that was, I think, deprecated a couple of decades ago, because it is not specific enough. Ask a Hoosier. But I think some maybe Linux dist'ns still use it as the default setting.
Setting the TZ environment var is the easiest way to avoid this. Another possibility might be to turn off the warning in a startup file.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by