Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Hello co_monks,
I'm a bit puzzeled about the behaviour of different versions of strftime. I got the following code:
use strict; use POSIX qw(strftime); print "Perl: $]\n"; print "POSIX: $POSIX::VERSION\n"; my $today = strftime("%d %m %Y %H:%M:%S", gmtime(time)); print 'scalar gmtime: ', scalar gmtime(time), "\n"; print "strftime'd gmtime: $today\n"; $today = strftime("%d %m %Y %H:%M:%S", localtime(time)); print 'scalar localtime: ', scalar localtime(time), "\n"; print "strftime'd localtime: $today\n";

Depending on what Perl version (and POSIX version) I use I get different output for gmtime.
Perl: 5.00503 POSIX: 1.02 scalar gmtime: Tue Jun 14 12:18:04 2005 strftime'd gmtime: 14 06 2005 13:18:04 scalar localtime: Tue Jun 14 14:18:04 2005 strftime'd localtime: 14 06 2005 14:18:04 Perl: 5.008006 POSIX: 1.08 scalar gmtime: Tue Jun 14 12:18:04 2005 strftime'd gmtime: 14 06 2005 12:18:04 scalar localtime: Tue Jun 14 14:18:04 2005 strftime'd localtime: 14 06 2005 14:18:04

Any hints about that? And b.t.w. '12:18:04' is the correct GMT.


In reply to POSIX::strftime with gmtime by pelagic

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [Discipulus]: so every library (js) to sdelect and modify the id parameters can be good.
    [Discipulus]: I never understood something: I can on the fly modify the XML structure of the SVG using for example XML::Twig ?
    [Corion]: Discipulus: If you want to rewrite the SVG, then yes, something like XML::Twig should be enough. I would try to not modify the SVG but only modify the display, but so far I haven't convinced IE to change the style...
    Corion gives up
    [Discipulus]: ah! so you mean if i need a static image i can use Twig, if on the fly better css selector and mody attrs (jquery?), rigth?
    [LanX]: not sure what you guys are taking about, but a DOM manipulation in JS shouldn't be difficult
    [Corion]: Discipulus: Yeah, that's what I would try (but so far, I can't even change the colors manually in the SVG, which is why I gave up ;) )
    Discipulus bad sign..

    How do I use this? | Other CB clients
    Other Users?
    Others having an uproarious good time at the Monastery: (13)
    As of 2017-03-23 09:42 GMT
    Find Nodes?
      Voting Booth?
      Should Pluto Get Its Planethood Back?

      Results (285 votes). Check out past polls.