IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 22707


Ignore:
Timestamp:
Feb 27, 2009, 11:08:58 AM (17 years ago)
Author:
Paul Price
Message:

Fixing display of times: no Z because it's not necessarily Zulu (UTC)
time. Let the type say what it is. Using all significant figures that psTimeToISO gives.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/types/psMetadataConfig.c

    r21390 r22707  
    821821        status = 0;
    822822        strValue = getToken (&linePtr, "#", &status, true);
    823        
     823
    824824        if (!status && strValue) {
    825             // found a directive, what does it say?
    826             if (strcasecmp (strValue, "UPDATE") && strcasecmp (strValue, "RESET")) {
    827                 psError(PS_ERR_IO, true, _("Invalid directive %s for METADATA or MULTI."), strValue);
    828                 psFree(strType);
    829                 psFree(strValue);
    830                 return false;
    831             }
    832 
    833             // found a directive, what does it say?
    834             if (!strcasecmp (strValue, "UPDATE")) {
    835                 // this folder or group is merged with an existing one of the same name
    836                 flags |= PS_META_UPDATE_FOLDER;
    837             }
    838             if (!strcasecmp (strValue, "RESET")) {
    839                 // this folder or group replaces an existing one of the same name
    840                 flags |= PS_META_REPLACE;
    841             }
    842             psFree(strValue);
    843             strValue = NULL;
    844         }
     825            // found a directive, what does it say?
     826            if (strcasecmp (strValue, "UPDATE") && strcasecmp (strValue, "RESET")) {
     827                psError(PS_ERR_IO, true, _("Invalid directive %s for METADATA or MULTI."), strValue);
     828                psFree(strType);
     829                psFree(strValue);
     830                return false;
     831            }
     832
     833            // found a directive, what does it say?
     834            if (!strcasecmp (strValue, "UPDATE")) {
     835                // this folder or group is merged with an existing one of the same name
     836                flags |= PS_META_UPDATE_FOLDER;
     837            }
     838            if (!strcasecmp (strValue, "RESET")) {
     839                // this folder or group replaces an existing one of the same name
     840                flags |= PS_META_REPLACE;
     841            }
     842            psFree(strValue);
     843            strValue = NULL;
     844        }
    845845
    846846        // Not all lines will have comments, so NULL is ok.
     
    887887            return false;
    888888        }
    889     } 
     889    }
    890890
    891891#define PARSE_ADD_CASE(NAME, TYPE, PARSEFUNC) \
     
    12411241        psError(PS_ERR_IO, true, _("failed to parse file '%s'"), filename);
    12421242        psFree(md);
    1243         psFree(file);
     1243        psFree(file);
    12441244        return NULL;
    12451245    }
     
    15161516            }
    15171517            psString timeStr = psTimeToISO(time);
    1518             psString timeOutput;
    1519             timeOutput = psStringNCopy(timeStr, 19);
    1520             psStringAppend(&content, "%s", timeOutput);
    1521             psStringAppend(&content, "Z");
     1518            psStringAppend(&content, "%s", timeStr);
    15221519            psFree(timeStr);
    1523             psFree(timeOutput);
    15241520        } else {
    15251521            // psTime is a NULL pointer
Note: See TracChangeset for help on using the changeset viewer.