From 0f9faa1abe45b932c6548199bcfb09474b5ef984 Mon Sep 17 00:00:00 2001 From: idea4good Date: Tue, 4 Dec 2018 17:01:40 +0800 Subject: [PATCH] fix Chinese date format issue --- core/core.vcxproj | 8 ++++---- gui/gui.vcxproj | 8 ++++---- sync.bat => sync_build.bat | 6 ++++-- 3 files changed, 12 insertions(+), 10 deletions(-) rename sync.bat => sync_build.bat (78%) diff --git a/core/core.vcxproj b/core/core.vcxproj index d411f63..788fabc 100644 --- a/core/core.vcxproj +++ b/core/core.vcxproj @@ -90,7 +90,7 @@ Windows - call "$(SolutionDir)sync.bat" "Core" + call "$(SolutionDir)sync_build.bat" "Core" @@ -106,7 +106,7 @@ Windows - call "$(SolutionDir)sync.bat" "Core" + call "$(SolutionDir)sync_build.bat" "Core" @@ -126,7 +126,7 @@ true - call "$(SolutionDir)sync.bat" "Core" + call "$(SolutionDir)sync_build.bat" "Core" @@ -146,7 +146,7 @@ true - call "$(SolutionDir)sync.bat" "Core" + call "$(SolutionDir)sync_build.bat" "Core" diff --git a/gui/gui.vcxproj b/gui/gui.vcxproj index 5f5d365..94a8358 100644 --- a/gui/gui.vcxproj +++ b/gui/gui.vcxproj @@ -104,7 +104,7 @@ Windows - call "$(SolutionDir)sync.bat" "Gui" + call "$(SolutionDir)sync_build.bat" "Gui" @@ -120,7 +120,7 @@ Windows - call "$(SolutionDir)sync.bat" "Gui" + call "$(SolutionDir)sync_build.bat" "Gui" @@ -140,7 +140,7 @@ true - call "$(SolutionDir)sync.bat" "Gui" + call "$(SolutionDir)sync_build.bat" "Gui" @@ -160,7 +160,7 @@ true - call "$(SolutionDir)sync.bat" "Gui" + call "$(SolutionDir)sync_build.bat" "Gui" diff --git a/sync.bat b/sync_build.bat similarity index 78% rename from sync.bat rename to sync_build.bat index cb91106..d05e88d 100644 --- a/sync.bat +++ b/sync_build.bat @@ -1,10 +1,12 @@ echo off set url="https://api.powerbi.com/beta/72f988bf-86f1-41af-91ab-2d7cd011db47/datasets/2ff1e8a8-2f6f-4d73-a75d-86829e3f4574/rows?key=8f5xLp1gP8%%2FzSee4vCUBcyjR65I9zZ6nb%%2B%%2F7bbzex%%2FSctLX3ntIlAR0sxWpDdguuYyDtLdHK%%2Fxbxj%%2FrSBkX7eQ%%3D%%3D" -set date= for /f "tokens=2-4 delims=/ " %%a in ("%date%") do (set MM=%%a& set DD=%%b& set YYYY=%%c) +set YY=%YYYY:~0,2% +if not "%YY%" == "20" (rem For Chinese date format + for /f "tokens=1-3 delims=/ " %%a in ("%date%") do (set YYYY=%%a& set MM=%%b& set DD=%%c)) set datetime=%YYYY%-%MM%-%DD%T%time: =0%0+0800 -set devie_info=Win-%USERNAME% +set devie_info=Win-%USERNAME% set raw_data=[{^ \"device_info\" :\"%devie_info%\",^ \"project_info\" :\"%1\",^