how to add a minor fix

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to add a minor fix

Frédéric Benninger
Hi,

How to commit minor fix to have output date string with two digits?

--- tahlib.pm Révision : 23649
+++ tahlib.pm Copie
@@ -31,7 +31,7 @@

     if ($Config->get("DateTimeString"))
     {
-        my ($s, $i, $h, $d, $m, $y) = (localtime)[0..7];
+        my ($s, $i, $h, $d, $m, $y) = map { sprintf("%02d",$_) }
(localtime)[0..7];
         ++$m;
         my $Y = $y + 1900;
         $y = $y % 100; # two-digit year


Regards
   benni_75

_______________________________________________
Tilesathome mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/tilesathome
Reply | Threaded
Open this post in threaded view
|

Re: how to add a minor fix

a_a-2
Hi,

Frédéric Benninger wrote:

> Hi,
>
> How to commit minor fix to have output date string with two digits?
>
> --- tahlib.pm Révision : 23649
> +++ tahlib.pm Copie
> @@ -31,7 +31,7 @@
>
>      if ($Config->get("DateTimeString"))
>      {
> -        my ($s, $i, $h, $d, $m, $y) = (localtime)[0..7];
> +        my ($s, $i, $h, $d, $m, $y) = map { sprintf("%02d",$_) }
> (localtime)[0..7];
>          ++$m;
>          my $Y = $y + 1900;
>          $y = $y % 100; # two-digit year
>
Fixed.
I also removed the square brackets around "DateTimeString", so if you
want them back you should edit "DateTimeString" in file "tilesAtHome.conf".


Best regards

Alfons


_______________________________________________
Tilesathome mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/tilesathome
Reply | Threaded
Open this post in threaded view
|

Re: how to add a minor fix

Dirk-Lüder Kreie
Am 20.10.2010 14:33, schrieb [hidden email]:

> Hi,
>
> Frédéric Benninger wrote:
>> Hi,
>>
>> How to commit minor fix to have output date string with two digits?
>>
>> --- tahlib.pm    Révision : 23649
>> +++ tahlib.pm    Copie
>> @@ -31,7 +31,7 @@
>>
>>      if ($Config->get("DateTimeString"))
>>      {
>> -        my ($s, $i, $h, $d, $m, $y) = (localtime)[0..7];
>> +        my ($s, $i, $h, $d, $m, $y) = map { sprintf("%02d",$_) }
>> (localtime)[0..7];
>>          ++$m;
>>          my $Y = $y + 1900;
>>          $y = $y % 100; # two-digit year
>>
> Fixed.
> I also removed the square brackets around "DateTimeString", so if you
> want them back you should edit "DateTimeString" in file "tilesAtHome.conf".
Please *always* commit any changes to trunk first, or they will be lost
on the next client version name change.

--
Dirk-Lüder "Deelkar" Kreie
Bremen - 53.0901°N 8.7868°E

Ceterum censeo Carthaginem esse delendam.


_______________________________________________
Tilesathome mailing list
[hidden email]
http://lists.openstreetmap.org/listinfo/tilesathome

signature.asc (270 bytes) Download Attachment