(self, obj)
| 54 | |
| 55 | class TimeFormat(Formatter): |
| 56 | def __init__(self, obj): |
| 57 | self.data = obj |
| 58 | self.timezone = None |
| 59 | |
| 60 | if isinstance(obj, datetime): |
| 61 | # Timezone is only supported when formatting datetime objects, not |
| 62 | # date objects (timezone information not appropriate), or time |
| 63 | # objects (against established django policy). |
| 64 | if is_naive(obj): |
| 65 | timezone = get_default_timezone() |
| 66 | else: |
| 67 | timezone = obj.tzinfo |
| 68 | if not _datetime_ambiguous_or_imaginary(obj, timezone): |
| 69 | self.timezone = timezone |
| 70 | |
| 71 | def a(self): |
| 72 | "'a.m.' or 'p.m.'" |
nothing calls this directly
no test coverage detected