You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
you can set the time by hand if there are issues with the ntp/ptp. ideally only done for testing
curl command
curl 'http://172.16.5.95:8080/?Module=DataSets.CmdGeneralTransfer&Chapter=3&Command' -X POST --data-raw 'Command=Set+Time&Year=2024&Day+of+Year=163&Seconds+of+Day=24595'
python script to set time on the ACU
importrequestsfromdatetimeimportdatetimedefget_current_time():
# Get the current timenow=datetime.utcnow()
# Extract the required componentsyear=now.yearday_of_year=now.timetuple().tm_ydayseconds_of_day=now.hour*3600+now.minute*60+now.second# Return the formatted timereturnyear, day_of_year, seconds_of_daydefsend_time_data(url):
# Get the current timeyear, day_of_year, seconds_of_day=get_current_time()
# Prepare the data payloaddata= {
'Command': 'Set Time',
'Year': year,
'Day of Year': day_of_year,
'Seconds of Day': seconds_of_day
}
# Send the POST requestresponse=requests.post(url, data=data)
# Return the responsereturnresponse# Define the URLurl='http://172.16.5.95:8080/?Module=DataSets.CmdGeneralTransfer&Chapter=3&Command'# Send the time dataresponse=send_time_data(url)
# Print the responseprint(f"Status Code: {response.status_code}")
print(f"Response Text: {response.text}")
The text was updated successfully, but these errors were encountered:
you can set the time by hand if there are issues with the ntp/ptp. ideally only done for testing
curl command
python script to set time on the ACU
The text was updated successfully, but these errors were encountered: