Update drone date and time for media

When taking pictures with the drone, the timestamp given is always 1970-01-01 with the hours, minutes, and seconds appearing to be how long it has been since the drone booted. Is there a way to correct this timestamp either permanently, on drone boot, or when a picture is taken?

I have messed around with CurrentDateTime but no luck so far.

Hi,

The time synchronization with CurrentDateTime only works for physical Anafi drones and doesn’t work with simulated drone. The following code snippet should do the trick:

import olympe
from olympe.messages.common.Common import CurrentDateTime
from pytz import timezone
import datetime


drone = olympe.Drone("192.168.42.1")
drone.connection()
tz_paris = timezone("Europe/Paris")
date_time = datetime.datetime.now(tz_paris).strftime("%Y%m%dT%H%M%S%z")
if drone(CurrentDateTime(date_time)).wait(5).success():
    print("Synchronization at {}".format(date_time))
else:
    print("Failed to synchronize at {}".format(date_time))
2 Likes