in reply to Re: Using split, splice, and join to remove time from scalar context return of localtime()
in thread Using split, splice, and join to remove time from scalar context return of localtime()

Without any use locale, does localtime use the current locale?
  • Comment on Re^2: Using split, splice, and join to remove time from scalar context return of localtime()
  • Select or Download Code

Replies are listed 'Best First'.
Re^3: Using split, splice, and join to remove time from scalar context return of localtime()
by BrowserUk (Patriarch) on Dec 18, 2009 at 00:33 UTC

    I've no idea. To either the question or it's relevance.

    But if it doesn't, I'd say that was a bug in Perl or the pragma.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      Your solution requires localtime to return strings with specific arrangement of characters. If localtime returns a string based on the locale, your solution could break.

      I don't know how to change locale to test.

        I don't know how to change locale

        And neither do I. And which given your undoubted spread of knowledge combined with my own seems sufficient reason to not waste time trying to cater for that possibility.

        For example, sort (and eq, ne et al.) will often not do what is expected by my algorithms (or yours), if the locale on the machines our code is run on is incompatible.

        For those that do need to know how, they've probably worked out how (something to do with POSIX::setlocale() perhaps?), and will likely also be well versed in tracking down and correcting problems that arise as a result.

        And if either of us ever actually need to know, we'll probably be able to work it out also.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.