Hello zwon, thanks for your reply. I have tried to write a patch to fix this issue.
phillip@athens:~/script/Date-Handler-1.2$ cat locale.patch --- Handler.pm.original 2010-11-12 16:49:31.817657134 +0800 +++ Handler.pm 2010-11-12 16:42:35.153656643 +0800 @@ -541,7 +541,7 @@ my $epoch = $self->{epoch}; - my $newdate = ref($self)->new({ date => $epoch, time_zone => +$self->TimeZone() }); + my $newdate = ref($self)->new({ date => $epoch, time_zone => +$self->TimeZone(), locale => $self->Locale() }); my $self_array = $newdate->AsArray(); #Take care of the months. @@ -554,7 +554,7 @@ $self_array->[0] += $years; my $posix_date = ref($self)->new({ date => $self_array, - time_zone => $self->TimeZone(), + time_zone => $self->TimeZone(), locale => $s +elf->Locale() }); if($self->INTUITIVE_MONTH_CALCULATIONS())
and I find a early mistaken in first post inwhich "Date::Handler::Delta" would not include locale and timezone. here's the modified codes and run without warning messages about locale.
#!/usr/bin/perl #name: date.pl use strict; use warnings; use Date::Handler; use Date::Handler::Delta; my $delta = new Date::Handler::Delta([3,0,0,0,0,0]); my $date = new Date::Handler({ date=>time, time_zone=>'Asia/Shanghai', locale=>'zh_CN.utf8', }); my $newdate = $date + $delta; print "date=$date\n"; print "delta=$delta\n"; print "newdate=$newdate\n";

In reply to Re^2: locale warnings when exec "+" op by PhillipHuang
in thread locale warnings when exec "+" op by PhillipHuang

Title:
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, details, 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, summary, 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.