django-synchro
django-synchro copied to clipboard
Wrong date for last_check in SynchroSettings
In changelog i have a date with millisecond: 2015-01-26 15:00:23.559368 and in dbsettings for last_check without: 2015-01-26 13:26:56. Then it makes an update for remote on every synchronization.
To solve this, i used:
SYNCHRO_DATETIME_INPUT_FORMATS = ('%Y-%m-%d %H:%M:%S.%f',)
class DateTimeMsValue(dbsettings.DateTimeValue):
formats_source = 'SYNCHRO_DATETIME_INPUT_FORMATS'
class SynchroSettings(dbsettings.Group):
last_check = DateTimeMsValue('Last synchronization', default=now())
Is there any better solution?