UTC vs Local time zone

I have an issue I just cannot seem to find a work around for.

I am on an international video project where I am working with multiple editors and shooting in multiple time zones. Personally, I prefer to look at and sort by the LOCAL TIME that the images were taken. However, Opus always coverts to LOCAL TIME of the computer that is looking at the files. Is there a way to look at the timestamps from the LOCAL time of image creation (without changing the time zone on the computer). I know Opus has in the past has been able to read/show UTC time instead of LOCAL COMPUTER TIME. Is there to view the files by LOCAL TIME of the time zone at creation?
If not, Is there a way to always show UTC time instead.??

Thanks for any help

setaspell

Are you sure the Date taken column is not image-local, but pc-local?

A custom column can display datetaken in UTC:

function OnInit(initData) {
    initData.name = 'Date taken UTC';
    initData.version = '2021-07-17';
    initData.url = 'https://resource.dopus.com/t/utc-vs-local-time-zone/39824';
    initData.desc = '';
    initData.default_enable = true;
    initData.min_version = '12.0';
}

function OnAddColumns(addColData) {
    var col = addColData.AddColumn();
    col.multicol = true;
    col.method = 'OnColumn';
    col.name = 'Date taken (UTC)';
    col.label = 'Date taken (UTC)';
    col.header = 'Date taken (UTC)';
    col.justify = 'right';
    col.defwidth = 6;
    col.autorefresh = 1;
    col.autogroup = true;
    col.type = 'datetime';

    var col = addColData.AddColumn();
    col.multicol = true;
    col.method = 'OnColumn';
    col.name = 'Date taken (local)';
    col.label = 'Date taken (local)';
    col.header = 'Date taken (local)';
    col.justify = 'right';
    col.defwidth = 6;
    col.autorefresh = 1;
    col.autogroup = true;
    col.type = 'datetime';
}

function OnColumn(scriptColData) {
    var dt = scriptColData.item.metadata.image.datetaken;
    var isDate = DOpus.Typeof(dt) == 'object.Date';
    
    scriptColData.columns('Date taken (UTC)').value = isDate ? dt.ToUTC() : '';
    
    // scriptColData.columns('Date taken (local)').value = isDate ? dt.ToUTC().FromUTC() : '';
    scriptColData.columns('Date taken (local)').value = isDate ? dt.Format('D#yyyy-MM-dd T#HH:mm:ss') : '';
}

I've included a Date taken (local) column as demo, however, I can't think of a simple way to compute the values.

ColumnDateTakenUTC.js.txt (1.4 KB)


How to use buttons and scripts from this forum

1 Like

Always showing UTC is possible via a script column like the one in Lxp's reply above mine.

Depending on how the camera is configured, "UTC" may actually be the camera's local time, but it depends on the camera.

Cameras that are aware of timezones and their location, such as smartphones, would probably not store the local time in the file at all; they would probably just store the UTC time. Working out the time in the location the photo was taken would require cross-referencing the GPS coordinates to a database of timezones, assuming the photos are GPS tagged.

So this is probably more a question of photo metadata, and how your cameras are all set up, and what metadata is available within the photos they save. If the data is in the files then it should be possible to display it in Opus, one way or another.

2 Likes

Thanks for the reply... I will spend some time with the script to see if that works for us. As for the cameras, yes they are recording UTC and adjusting for timezone based on our own settings. We can choose timezones as well as GPS atomic clock timecode. We just like to work with image acquisition time zone to keep the calendar straight.. ie shooting at 8am in Japan actually shows as previous day in UTC.... For us it is just a bit easier to communicate shooting schedules in local shooting time vs UTC or Los Angeles time... for instance.. We shot that on Wednesday in the afternoon but look at Tuesday night's file to find it.. I know... a petty little issue...but still something we have to deal with on a routine basis.... Thanks for the help.

2 Likes