[Munich-pm] [NL-PM] This time on-topic: How to get Central European Time on any server anywhere in the world

Steffen Beyer steffenolfbeyer at yahoo.com.br
Mi Mär 30 13:14:29 PDT 2016


Hi Mark! 



    Em Quarta-feira, 30 de Março de 2016 19:40, Mark Overmeer <mark at overmeer.net> escreveu:
 

 * NL Perl Mongers (nl-pm at amsterdam.pm.org) [160330 17:19]:
> I just encountered the problem that I needed Central European Time
> (for timestamps etc.) on a server located in the USA.
  ...
> However, we make two observations: firstly, every Un*x server knows GMT.
  ...

Are the zoneinfo files not installed on your system?
[Steffen] I don't know, I only know that Perl and Date::Calc *ARE* installed! :-)[Steffen] I also wanted to show how one can do these calculations with Date::Calc, as an additional one of the "recipes" given in the module's docs.


  TZ=CET date

Or in Perl

  $ENV{TZ} = 'CET';
  POSIX::tzset();
  print POSIX::ctime();

perl -MPOSIX -e '$ENV{TZ} = ":Asia/Saigon"; tzset(); print asctime(localtime)'

  Thu Mar 31 00:37:56 2016
[Steffen] Thanks a lot for the hint!![Steffen] I will try that immediately.

They know for sure about all years in the past, and predict the rules
for the future.
[Steffen] I don't need past nor future, I only need the present (flowing along with time of course).[Steffen] As I said, this is for visible time stamps (in a web application).

Or is there something I am missing from your question?
[Steffen] No, you are spot on! :-)
-- 
greetz,
              MarkOv

------------------------------------------------------------------------
drs Mark A.C.J. Overmeer                                MARKOV Solutions
      Mark at Overmeer.net                          solutions at overmeer.net
http://Mark.Overmeer.net                   http://solutions.overmeer.net

Cheers,Steffen
-- 
See also:
http://www.fluomedia.org/ - Underwater Fluorescence (Scuba Diving)
http://sb.fluomedia.org/download/ - Free Perl and C Software  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/munich-pm/attachments/20160330/a9ab4aa7/attachment.html>


Mehr Informationen über die Mailingliste Munich-pm