From b8c84ebc75fe9be3e04da01b64ce8375c79e9f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Thu, 7 Oct 2021 01:35:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=B6=E9=97=B4=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E5=B7=A5=E5=85=B7=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- util/time.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 util/time.go diff --git a/util/time.go b/util/time.go new file mode 100644 index 0000000..89c7752 --- /dev/null +++ b/util/time.go @@ -0,0 +1,19 @@ +// Package util ... +// +// Description : 时间相关操作 +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 2021-10-07 1:33 上午 +package util + +import "time" + +// GetCurrentFormatTime 获取当前时间的格式化时间(秒) +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 1:34 上午 2021/10/7 +func GetCurrentFormatTime() string { + return time.Now().Format("2006-01-02 15:04:05") +}