by jiri » Fri Jul 01, 2011 3:45 am
Prior to MM 4.0 all dates in DB were stored as local time, according to timezone set for the PC. Since this caused some problems, we decided to switch to UTC time instead for MM 4.0. It means that all date values as are stored in Songs and Played tables in UTC, i.e. +/- few hours from the values that were in DB in MM 3.x. Note that it doesn't affect pretty much anything else than DB, since the timezone offset is automatically added by MM, so e.g. if a script author accesses FileModified property of SDBSongData object, there's no difference between MM 3.x and MM 4.x.
One more small change was the addition of UTCOffset field to Played table. It contains the timezone offset from UTC of the value in PlayDate field. It has the same scale as other Date fields, i.e. 1 = day, 1/24 = hour. So, for example if a user is in Paris and it's summer (i.e. +2 hours from UTC), UTCOffset will have value 2/24. Note that this addition to MM.DB can be useful for users who travel a lot, since scripts can access playcount statistics both in the current local time, or in time that was local during playback, whichever is preferable.
Jiri
Prior to MM 4.0 all dates in DB were stored as local time, according to timezone set for the PC. Since this caused some problems, we decided to switch to UTC time instead for MM 4.0. It means that all date values as are stored in Songs and Played tables in UTC, i.e. +/- few hours from the values that were in DB in MM 3.x. Note that it doesn't affect pretty much anything else than DB, since the timezone offset is automatically added by MM, so e.g. if a script author accesses FileModified property of SDBSongData object, there's no difference between MM 3.x and MM 4.x.
One more small change was the addition of UTCOffset field to Played table. It contains the timezone offset from UTC of the value in PlayDate field. It has the same scale as other Date fields, i.e. 1 = day, 1/24 = hour. So, for example if a user is in Paris and it's summer (i.e. +2 hours from UTC), UTCOffset will have value 2/24. Note that this addition to MM.DB can be useful for users who travel a lot, since scripts can access playcount statistics both in the current local time, or in time that was local during playback, whichever is preferable.
Jiri