- Timestamp:
- 30/03/07 15:25:43 (14 years ago)
- Location:
- TI02-CSML/trunk/csml/csmllibs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TI02-CSML/trunk/csml/csmllibs/csmlfeaturetypes.py
r2356 r2357 145 145 timeposList=cp.TimePositionList() 146 146 timeposList.CONTENT=self.timeString 147 timeposList.frame=' %s:%s'%(self.caltype,self.units)147 timeposList.frame='ndg:%s:%s'%(self.caltype,self.units) 148 148 sptList.timePositionList=timeposList 149 149 else: #for all other dimensions, create ordinates … … 422 422 except AttributeError: 423 423 #if units attribute doesn't exist: 424 strUom ="dimensionless or units notdetermined"424 strUom ="dimensionless_or_units_not_determined" 425 425 try: 426 426 measuredvalues = DI.getDataForVar() -
TI02-CSML/trunk/csml/csmllibs/csmltime.py
r2206 r2357 22 22 def UDtimeToCSMLtime(time): 23 23 #time string manipulation - convert 2783-5-22 0:0:0.0 to 2783-5-22T0:0:0.0 24 return str(time).replace (' ', 'T') 24 newdate='' 25 newtime='' 26 date = str(time).split()[0] 27 t=str(time).split()[1] 28 for item in date.split('-'): 29 if len(item)==1: 30 item='0'+item 31 newdate=newdate + item +'-' 32 for item in t.split(':'): 33 if len(item)==1: 34 item='0'+item+':' 35 elif len(item)==3: 36 item='0'+item 37 newtime=newtime + item 38 csmlt=newdate[:-1]+'T'+newtime 39 return str(csmlt) 25 40 26 41 def setcdtimeCalendar(cal):
Note: See TracChangeset
for help on using the changeset viewer.