Changeset 8194 for main/waeup.kofa/trunk/src/waeup/kofa/accesscodes
- Timestamp:
- 17 Apr 2012, 11:40:06 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/accesscodes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/accesscode.py
r8186 r8194 356 356 if batch_name in self.keys(): 357 357 raise KeyError('Batch already exists: %s' % batch_name) 358 tz = getUtility(IKofaUtils).tzinfo359 358 batch = AccessCodeBatch( 360 datetime. now(tz), creator, prefix, cost, 0, num=num)359 datetime.utcnow(), creator, prefix, cost, 0, num=num) 361 360 num_entries = 0 362 361 self[batch_name] = batch … … 430 429 creator = 'system' 431 430 entry_num = 0 432 tz = getUtility(IKofaUtils).tzinfo 433 creation_date = datetime.now(tz) 431 creation_date = datetime.utcnow() 434 432 basecontainer.createBatch(creation_date, creator, 435 433 'SFE', cost, entry_num) -
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/browser.py
r8182 r8194 85 85 def createBatch(self, **data): 86 86 creator = self.request.principal.id 87 tz = getUtility(IKofaUtils).tzinfo 88 creation_date = datetime.now(tz) 87 creation_date = datetime.utcnow() 89 88 data.update(creation_date=creation_date, creator=creator) 90 89 batch = self.context.createBatch(**data) -
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/tests/test_accesscode.py
r8186 r8194 259 259 self.app = self.getRootFolder()['app'] 260 260 261 tz = getUtility(IKofaUtils).tzinfo262 261 batch = AccessCodeBatch( # create batch with zero entries 263 datetime. now(tz), 'testuser', 'FOO', 9.99, 0)262 datetime.utcnow(), 'testuser', 'FOO', 9.99, 0) 264 263 self.app['accesscodes'].addBatch(batch) 265 264
Note: See TracChangeset for help on using the changeset viewer.