Skip to content

Instantly share code, notes, and snippets.

@noromanba
Created February 19, 2012 07:34
Show Gist options
  • Save noromanba/1862470 to your computer and use it in GitHub Desktop.
Save noromanba/1862470 to your computer and use it in GitHub Desktop.
Stdout iso8601 format, work in a standard environment of OS
@rem ===========================================================================
@rem Stdout iso8601 format, work in a standard environment of OS.
@rem @author noromanba
@rem @license MIT License http://nrm.mit-license.org/2012
@rem @see https://gist.github.com/1862470
@rem @see http://www.atmarkit.co.jp/fwin2k/win2ktips/419batchdate/batchdate.html
@rem @see http://d.hatena.ne.jp/kurukuru-papa/20090412/1239529114
@rem @see http://blog.livedoor.jp/blackwingcat/archives/908078.html
@rem ===========================================================================
@echo off
cd %~dp0
set TZ=+09:00
set DATE=%date:/=-%
set FULLTIME=%time: =0%
set HHMMSS=%FULLTIME:~0,8%
set ISO8601=%DATE%T%HHMMSS%%TZ%
set /p NOLINEBREAK=%ISO8601%< nul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment