forked from ehsteve/microflare_dem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbreak_time.pro
executable file
·37 lines (28 loc) · 1 KB
/
break_time.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FUNCTION break_time, t_in, qdebug = qdebug
; IDL Version 5.4 (sunos sparc)
; Journal File for hhudson@delsol
; Working directory: /home/hhudson/fe_line_ii
; Date: Sun Jul 20 11:45:38 2003
;
;MODIFIED: Steven Christe (10-apr-09), made compatible with arrays of t_in
if n_elements(t_in) eq 0 then t_in = !stime
dim = n_elements(t_in)
filname = strarr(dim)
FOR i = 0, dim-1 DO BEGIN
extime = anytim(t_in[i],/ext)
year = strtrim(string(extime(6)),1)
month = strtrim(string(extime(5)),1)
if strlen(month) eq 1 then month = '0'+month
day = strtrim(string(extime(4)),1)
if strlen(day) eq 1 then day = '0'+day
hour = strtrim(string(extime(0)),1)
if strlen(hour) eq 1 then hour = '0'+hour
minute = strtrim(string(extime(1)),1)
if strlen(minute) eq 1 then minute = '0'+minute
second = strtrim(string(extime(2)),1)
if strlen(second) eq 1 then second = '0'+second
filname[i] = year+month+day+'_'+hour+minute+second
if keyword_set(qdebug) then stop
ENDFOR
RETURN, filname
end