IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10722


Ignore:
Timestamp:
Dec 14, 2006, 1:32:31 AM (19 years ago)
Author:
magnier
Message:

hack fixes for time concepts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/concepts/pmConceptsStandard.c

    r10511 r10722  
    336336        timeSys = psMetadataLookupS32(&mdok, fpa->concepts, timesysName);
    337337    }
    338     if (!mdok) {
     338    if (!mdok || (timeSys == 0xffffffff)) {
    339339        psLogMsg(__func__, PS_LOG_WARN, "Unable to find %s in concepts when parsing %s --- assuming UTC.\n",
    340340                 timesysName, pattern->name);
     
    346346    bool usaTime = false;               // Is the time specified in USA (MM-DD-YYYY) order?
    347347    bool backwardsTime = false;         // Is the time specified in backwards (DD-MM-YYYY) order?
     348    bool yearFirst = false;            // Is the time specified in yearFirst (YYYY-MM-DD) order?
    348349    bool pre2000Time = false;           // Is the time specified pre-2000 (where the year only has two digits)
    349350    bool mjdTime = false;               // Is the time specified a MJD?
     
    364365
    365366    // Parse the time format
     367    // why should more than one be allowed??
    366368    psList *timeFormats = psStringSplit(timeFormat, " ,;", false); // List of the format options
    367369    psListIterator *timeFormatsIter = psListIteratorAlloc(timeFormats, PS_LIST_HEAD, false); // Iter
     
    370372            usaTime = true;
    371373            backwardsTime = false;
     374            yearFirst = false;
    372375            jdTime = false;
    373376            mjdTime = false;
     
    375378            backwardsTime = true;
    376379            usaTime = false;
     380            yearFirst = false;
     381            jdTime = false;
     382            mjdTime = false;
     383        } else if (strcasecmp(timeFormat, "YEAR.FIRST") == 0) {
     384            yearFirst = true;
     385            usaTime = false;
     386            backwardsTime = false;
    377387            jdTime = false;
    378388            mjdTime = false;
     
    382392            mjdTime = true;
    383393            jdTime = false;
     394            yearFirst = false;
    384395            backwardsTime = false;
    385396            usaTime = false;
     
    387398            jdTime = true;
    388399            mjdTime = false;
     400            yearFirst = false;
    389401            backwardsTime = false;
    390402            usaTime = false;
Note: See TracChangeset for help on using the changeset viewer.