imp: add: avoid deprecated time function
This commit is contained in:
		
							parent
							
								
									6914333526
								
							
						
					
					
						commit
						b3aff7a394
					
				| @ -30,7 +30,7 @@ import qualified Data.Text.IO as T | |||||||
| import qualified Data.Text.Lazy as TL | import qualified Data.Text.Lazy as TL | ||||||
| import qualified Data.Text.Lazy.IO as TL | import qualified Data.Text.Lazy.IO as TL | ||||||
| import Data.Time.Calendar (Day) | import Data.Time.Calendar (Day) | ||||||
| import Data.Time.Format (formatTime, defaultTimeLocale, iso8601DateFormat) | import Data.Time.Format (formatTime, defaultTimeLocale) | ||||||
| import Lens.Micro ((^.)) | import Lens.Micro ((^.)) | ||||||
| import Safe (headDef, headMay, atMay) | import Safe (headDef, headMay, atMay) | ||||||
| import System.Console.CmdArgs.Explicit (flagNone) | import System.Console.CmdArgs.Explicit (flagNone) | ||||||
| @ -167,7 +167,7 @@ confirmedTransactionWizard prevInput es@EntryState{..} stack@(currentStage : _) | |||||||
|             } |             } | ||||||
|           dateAndCodeString = formatTime defaultTimeLocale yyyymmddFormat date |           dateAndCodeString = formatTime defaultTimeLocale yyyymmddFormat date | ||||||
|                             ++ T.unpack (if T.null code then "" else " (" <> code <> ")") |                             ++ T.unpack (if T.null code then "" else " (" <> code <> ")") | ||||||
|           yyyymmddFormat = iso8601DateFormat Nothing |           yyyymmddFormat = "%Y-%m-%d" | ||||||
|       confirmedTransactionWizard prevInput{prevDateAndCode=Just dateAndCodeString} es' (EnterDescAndComment (date, code) : stack) |       confirmedTransactionWizard prevInput{prevDateAndCode=Just dateAndCodeString} es' (EnterDescAndComment (date, code) : stack) | ||||||
|     Nothing -> |     Nothing -> | ||||||
|       confirmedTransactionWizard prevInput es stack |       confirmedTransactionWizard prevInput es stack | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user