Skip to content

Commit

Permalink
rebase and local time as default if utc_time doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharkitty committed Mar 12, 2024
1 parent 9113a28 commit 35fbe72
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions openpype/hosts/blender/api/workio.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ def check_workfile_up_to_date() -> bool:

scene = bpy.context.scene

last_published_time = (
last_published_version["data"].get("utc_time")
or last_published_version["data"]["time"]
last_published_time = last_published_version["data"].get(
"utc_time", last_published_version["data"]["time"]
)

if scene.get("op_published_time"):
return last_published_time <= scene["op_published_time"]
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from openpype.lib.dateutils import get_timestamp

if __name__ == "__main__":
current_time = get_timestamp()
current_time = get_timestamp(datetime_obj=datetime.utcnow())

log = Logger().get_logger()
log.debug(f"Setting workfile last publish time to {current_time}")
Expand Down

0 comments on commit 35fbe72

Please sign in to comment.