From 25301c22537b43969167ecb0f149c1ebc8a44d8e Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 26 Apr 2021 08:58:02 +0200 Subject: high: Update format for time values. * drmaa/v1/high.scm (): Update string format for time attributes. --- drmaa/v1/high.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drmaa/v1/high.scm b/drmaa/v1/high.scm index f3edda9..8e91e12 100644 --- a/drmaa/v1/high.scm +++ b/drmaa/v1/high.scm @@ -25,6 +25,7 @@ #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) #:use-module (ice-9 match) + #:use-module (ice-9 format) #:export (job-template with-drmaa-session @@ -243,7 +244,7 @@ (and (time? value) (eq? time-duration (time-type value)))) #:transform (lambda (value) - (format #false "~a" (time-second value))) + (format #false "00:00:~2,'0d" (time-second value))) #:drmaa-name (low:DRMAA 'DURATION_HLIMIT)) (duration-slimit #:accessor job-template-duration-slimit @@ -252,7 +253,7 @@ (and (time? value) (eq? time-duration (time-type value)))) #:transform (lambda (value) - (format #false "~a" (time-second value))) + (format #false "00:00:~2,'0d" (time-second value))) #:drmaa-name (low:DRMAA 'DURATION_SLIMIT)) (wct-hlimit #:accessor job-template-wct-hlimit @@ -261,7 +262,7 @@ (and (time? value) (eq? time-duration (time-type value)))) #:transform (lambda (value) - (format #false "~a" (time-second value))) + (format #false "00:00:~2,'0d" (time-second value))) #:drmaa-name (low:DRMAA 'WCT_HLIMIT)) (wct-slimit #:accessor job-template-wct-slimit @@ -270,7 +271,7 @@ (and (time? value) (eq? time-duration (time-type value)))) #:transform (lambda (value) - (format #false "~a" (time-second value))) + (format #false "00:00:~2,'0d" (time-second value))) #:drmaa-name (low:DRMAA 'WCT_SLIMIT)) ;; Class options -- cgit v1.2.3