blob: fb60d448d6288da441ce08755f9e6669f58551a6 [file] [log] [blame]
# Copyright 2017 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
### set the clock on target using host clock
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/../lib/ || exit $?
if [[ "$(uname -s)" = "Darwin" ]]; then
device_date=`date +%Y-%m-%dT%T`
device_date=`date -Iseconds`
echo "Setting device's clock to ${device_date}"
fx-command-run shell "clock --set ${device_date}"