Zasfe
Zasfe's memory
Zasfe
전체 방문자
557,295
오늘
0
어제
15
  • 분류 전체보기 (143)
    • 이야기 (50)
    • 뜻알기 (1)
    • 컴퓨터 (91)

인기 글

  • 리눅스에서 오라클 실행하기
    2014.07.04
  • 이벤트로그에 10016 Distribute⋯
    2014.10.07
    이벤트로그에 10016 Distribute⋯
  • 신뢰할수 있는 사이트 등록하기
    2009.05.22
  • [ASP] Session.Timeout 최대값⋯
    2009.12.08
    [ASP] Session.Timeout 최대값⋯
  • CentOS 5.x 설치후 X Window 설⋯
    2014.06.24

최근 글

  • 워나크라이(WannaCry) 대란
    2017.05.15
  • 이벤트로그에 10016 Distribute⋯
    2014.10.07
    이벤트로그에 10016 Distribute⋯
  • 리눅스에서 오라클 실행하기
    2014.07.04
  • CentOS 5.x 설치후 X Window 설⋯
    2014.06.24
  • CentOS 4.x Yum repo 재설정 방법
    2014.06.20

태그

  • 캐슬
  • IIS7
  • cmd
  • webshell
  • nslookup
  • IIS
  • VBScript
  • webknight2.1
  • web.config
  • MSSQL2K
  • Microsoft Windows 2000 Scripting Guide
  • 홈페이지 보안 강화도구
  • webknight 2.2
  • ASP
  • MSSQL
  • 보안
  • webknight2.2
  • 배치파일
  • error
  • Autoit
  • rsync
  • webhacking
  • 생각
  • 저장프로시저
  • Castle
  • Security
  • Skin
  • Function
  • webknight
  • backup
hELLO · Designed By 정상우.
Zasfe

Zasfe's memory

컴퓨터

UTC 시간을 확인하기 위한 스크립트

2010. 1. 28. 01:00
http://www.u229.no/stuff/snippets/UTC.asp
http://www.paulsadowski.com/wsh/timestamp.htm

Sample output:
timestamp.vbs
1041812764

timestamp.vbs 1041812764
Mon Jan 6 00:26:04 2003

You can specify multiple timestamps on the command-line.

Please change the constant 'off' to reflect the offset in hours from UTC for your locale.

 
--------------------------------------------------------------------------------
 
An example script:

' Your timezone's offset, in hours, from UTC (change for your locale)
Const off = -5

args = WScript.Arguments.Count
if args = 0 then
 SecsSince = CLng(DateDiff("s", "01/01/1970 00:00:00", Now))
 wscript.echo SecsSince - 3600 * abs(off)
else
 for x = 0 to args - 1
  dt = DateAdd("s", WScript.Arguments.Item(x), "01/01/1970 00:00:00")
  fdt = FormatDateTime(DateValue(dt))
  ftm = FormatDateTime(TimeValue(dt))
  if Len(fdt) < 10 then
   fdt = space(10 - Len(fdt)) & fdt
  end if
  if Len(ftm) = 10 then
   ftm = " " & ftm
  end if
  ThisTime = fdt & " " & ftm
  Wscript.Echo WeekDayName(WeekDay(ThisTime), true) &_
  space(1) & MonthName(Month(ThisTime), true) & space(1) &_
  Day(ThisTime) & space(1) & right("00" & Hour(ThisTime), 2) &_
  ":" & right("00" & Minute(ThisTime), 2) & ":" & right("00" &_
  Second(ThisTime), 2) & space(1) & Year(ThisTime)
 next
end if

 
--------------------------------------------------------------------------------
 
Bare Functions

Function TS2Date(TS)
TS2Date = DateAdd("s", TS, "01/01/1970 00:00:00")
End Function

Function UDateNow()
UDateNow = CLng(DateDiff("s", "01/01/1970 00:00:00", Now))
End Function

Function UDate(ThisDate)
UDate = CLng(DateDiff("s", "01/01/1970 00:00:00", ThisDate))
End Function

'컴퓨터' 카테고리의 다른 글

IIS7 에서는 일반연결(http) 와 보안연결(https) 간 세션유지가 되지 않습니다.  (1) 2010.02.06
데이터베이스 간략정보 추출 쿼리  (0) 2010.01.28
UTC 시간을 확인하기 위한 스크립트  (0) 2010.01.28
2년전 백업 정보 삭제 쿼리(mssql 2000)  (0) 2010.01.27
WebDAV 인증 우회에 대한 취약점  (0) 2010.01.27
IIS 파일확장자 우회취약점은 IIS6 에서만 동작합니다.  (1) 2009.12.30
    '컴퓨터' 카테고리의 다른 글
    • IIS7 에서는 일반연결(http) 와 보안연결(https) 간 세션유지가 되지 않습니다.
    • 데이터베이스 간략정보 추출 쿼리
    • 2년전 백업 정보 삭제 쿼리(mssql 2000)
    • WebDAV 인증 우회에 대한 취약점
    UTC, VBScript, VB함수, 시간변환
    Zasfe
    Zasfe
    느낌. 기억
    댓글쓰기
    다음 글
    데이터베이스 간략정보 추출 쿼리
    이전 글
    2년전 백업 정보 삭제 쿼리(mssql 2000)
    • 이전
    • 1
    • ···
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • ···
    • 91
    • 다음

    티스토리툴바