Skip to content

Instantly share code, notes, and snippets.

@barezina
Created February 26, 2026 02:04
Show Gist options
  • Select an option

  • Save barezina/ecdb29f005fb1712901189335249ca98 to your computer and use it in GitHub Desktop.

Select an option

Save barezina/ecdb29f005fb1712901189335249ca98 to your computer and use it in GitHub Desktop.
davinci resolve dates >> comments (source tape bug)
# use this code for the date created column
from datetime import datetime
pm = resolve.GetProjectManager()
proj = pm.GetCurrentProject()
mp = proj.GetMediaPool()
bin = mp.GetCurrentFolder()
print('in bin ', bin.GetName())
clips = bin.GetClips()
for i in clips:
print(clips[i].GetClipProperty('Date Created'))
propDate = clips[i].GetClipProperty('Date Created')
date_format = "%a %b %d %Y %H:%M:%S"
datetime_obj = datetime.strptime(propDate, date_format)
unix_timestamp = str(int(datetime_obj.timestamp()))
print("Unix Timestamp:", unix_timestamp)
clips[i].SetClipProperty("Comments", unix_timestamp)
# use this code for the date modified column
from datetime import datetime
pm = resolve.GetProjectManager()
proj = pm.GetCurrentProject()
mp = proj.GetMediaPool()
bin = mp.GetCurrentFolder()
print('in bin ', bin.GetName())
clips = bin.GetClips()
for i in clips:
print(clips[i].GetClipProperty('Date Modified'))
propDate = clips[i].GetClipProperty('Date Modified')
date_format = "%a %b %d %H:%M:%S %Y"
datetime_obj = datetime.strptime(propDate, date_format)
unix_timestamp = str(int(datetime_obj.timestamp()))
print("Unix Timestamp:", unix_timestamp)
clips[i].SetClipProperty("Comments", unix_timestamp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment