[Thread Prev][Thread Next][Index]

Re: LAS version problem



Ding,

There is a new module, TMAPDate.pm that handles all date strings coming in to LAS. Supported formats are listed below where fields are numeric except for months where character (MMM = 'Jan, Feb, Mar, ...') and numeric ('mm' = '01, 02, 03, ...') formats are accepted. The separator may be any of '.', '/', or '-'. Date strings without a year are climatological dates.

The reason your DD-mm-YYYY format is not accepted is that a date like "03-04-2003" is ambiguous: to an American this is March 4'th, 2003 but to a European this is April 3'rd, 2003.


-- Jon


YYYYmmDDHHMMSS
YYYY-MMM-DD
MMM-DD-YYYY
DD-MMM-YYYY
YYYY-MMM-D
MMM-D-YYYY
D-MMM-YYYY
YYYY-mm-DD
YYYY-mm-D
YYYY-m-DD
YYY-mm-DD
YYYY-m-D
YYYYmmDD
YYY-m-DD
YY-mm-DD
YYY-m-D
YY-m-DD
YY-mm-D
Y-mm-DD
YY-m-D
Y-mm-D
Y-m-DD
DD-MMM
MMM-DD
Y-m-D
D-MMM
MMM-D
MMM


Chi Ding wrote:

Hi there
I have been running a customized LAS 6.1.0.2
on a RedHat 7.3 box for a long time and it's working fine.
Yesterday when I ported my customized code to a solaris machine
which is running another version of LAS ( probaby 6.2), I met a problem.
When I submitted a request to LASserver.pl, I got an error
[Mon Dec 15 13:59:25 2003] Invalid date '28-09-2003'
I tried different date format like '09-28-2003' or '28/09/2003', but
none of them worked.
I found the error information was printed by Ferret.pl at subroutine
sub validateDate {
my $datein = shift;
my $status = 0;
if ($datein){
my $date = new TMAP::Date($datein);
if ($date->isError && validateNumber($datein)) {
die "Invalid date '$datein'\n";
}
}
Anybody could help me about this problem?
My XML request was as following
<?xml version="1.0"?><lasRequest package="" href="file:las.xml"><link
match="/lasdata/operations/MooringTest"/><properties><ferret><size>.5</size><format>gif</format></ferret></properties><args><link
match="/lasdata/datasets/mb1_nc/variables/wind_speed"/>"<link
match="/lasdata/datasets/mb1_nc/variables/wind_direction"/>"<link
match="/lasdata/datasets/mb1_nc/variables/sal_depth2"/>"<link
match="/lasdata/datasets/mb1_nc/variables/temp_depth2"/>"<region><point
v="-30" type="x"/><point v="40" type="y"/><point v="0" type="z"/><range
low="28-09-2003" type="t" high="30-09-2003"/></region></args></lasRequest>

Thanks a lot, Ding



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement