(d?: Date)
| 56 | * Access log format date. format: `moment().format('DD/MMM/YYYY:HH:mm:ss ZZ')` |
| 57 | */ |
| 58 | export function accessLogDate(d?: Date): string { |
| 59 | // 16/Apr/2013:16:40:09 +0800 |
| 60 | d = d || new Date(); |
| 61 | const [ year, month, date, hours, minutes, seconds ] = getDateStringParts(d); |
| 62 | const TIMEZONE = getTimezone(d); |
| 63 | return `${date}/${MONTHS[month]}/${year}:${hours}:${minutes}:${seconds} ${TIMEZONE}`; |
| 64 | } |
| 65 | |
| 66 | export function getTimezone(d: Date) { |
| 67 | const key = d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate(); |
no test coverage detected
searching dependent graphs…