Skip to content

Commit

Permalink
setdate function added for time sync
Browse files Browse the repository at this point in the history
setdate  function added for time sync
this is for new version of the Android app which is able to take photos (shoot)
recommended to make a time sync before shooting new photos
  • Loading branch information
ilker-aktuna authored May 16, 2023
1 parent c2773a6 commit c8b6032
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions SD-card-root/mods/www/cgi-bin/setdate
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

millis=$(echo "$QUERY_STRING" | sed -n 's/^.*millis=\([^&]*\).*$/\1/p' | sed "s/%20/ /g")



if [[ $millis ]]; then
result=`date +"%s.%N" -s @$millis`
result2=`date`
echo "Content-Type: application/json"
echo
echo "{\"cmdresult\": \"$result\", \"currentdate\": \"$result2\"}"


exit 0
fi

0 comments on commit c8b6032

Please sign in to comment.