/usr/share/pyshared/zc/datetimewidget/demo/content.py is in python-zc.datetimewidget 0.7.0-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | from persistent import Persistent
from zope.interface import implements
from zope.container.contained import Contained
from zope.schema.fieldproperty import FieldProperty
from interfaces import IDemoContent
from datetime import datetime
import pytz
class DemoContent(Persistent, Contained):
implements(IDemoContent)
startDate = FieldProperty(IDemoContent['startDate'])
endDate = FieldProperty(IDemoContent['endDate'])
startDatetime = FieldProperty(IDemoContent['startDatetime'])
endDatetime = FieldProperty(IDemoContent['endDatetime'])
severalDates = FieldProperty(IDemoContent['severalDates'])
@property
def now(self):
return datetime.utcnow().replace(tzinfo=pytz.utc)
|