1
0
mirror of https://github.com/ManyakRus/telegram_loki.git synced 2024-12-12 09:33:50 +02:00

сделал StringDateTime

This commit is contained in:
Nikitin Aleksandr 2024-11-08 12:58:06 +03:00
parent 9104e9c360
commit 94c9cdd227
8 changed files with 19 additions and 6 deletions

View File

@ -1 +1 @@
2024-11-08 07:03:49.367
2024-11-08 09:57:49.710

View File

@ -1 +1 @@
00169
00170

2
go.mod
View File

@ -5,7 +5,7 @@ go 1.22.0
toolchain go1.22.1
require (
github.com/ManyakRus/starter v1.0.67
github.com/ManyakRus/starter v1.0.68
github.com/golang-module/carbon/v2 v2.4.1
github.com/jackc/pgx/v5 v5.7.1
)

2
go.sum
View File

@ -4,6 +4,8 @@ github.com/ManyakRus/logrus v0.0.0-20231019115155-9e6fede0d792 h1:bxwxD0H3kSUAH3
github.com/ManyakRus/logrus v0.0.0-20231019115155-9e6fede0d792/go.mod h1:OUyxCVbPW/2lC1e6cM7Am941SJiC88BhNnb24x2R3a8=
github.com/ManyakRus/starter v1.0.67 h1:mC+3oUSIBVLZKhjJLTodkrBPHzNi6Q5jQL6JnMdFBHk=
github.com/ManyakRus/starter v1.0.67/go.mod h1:U9WyHWnavyxu4+J5D6VpF3G2yZ4KagfSNM2Soo9O+7c=
github.com/ManyakRus/starter v1.0.68 h1:UL2gS+dQ0gFwTizKlfw24bVaXRfgKqEgjombzRov3Ao=
github.com/ManyakRus/starter v1.0.68/go.mod h1:U9WyHWnavyxu4+J5D6VpF3G2yZ4KagfSNM2Soo9O+7c=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=

View File

@ -55,7 +55,9 @@ func ReadTicker() {
// Start_period - запускает чтение логов всех сервисов за период
func Start_period(Date1, Date2 time.Time) {
log.Debug("Start search errors from: ", Date1, " to: ", Date2)
sDate1 := micro.StringDateTime(Date1)
sDate2 := micro.StringDateTime(Date2)
log.Debug("Start search errors from: ", sDate1, " to: ", sDate2)
IsOnlyErrors := true
var err1 error
var err error

View File

@ -1 +1 @@
8c489f6 2024-11-07 17:49:55 +0300
9104e9c 2024-11-08 10:04:35 +0300

View File

@ -575,6 +575,15 @@ func StringDate(t time.Time) string {
return Otvet
}
// StringDateTime - возвращает строку дата и время, без миллисекунд
func StringDateTime(t time.Time) string {
Otvet := ""
Otvet = t.Format("02.01.2006 15:04:05")
return Otvet
}
// ProgramDir_bin - возвращает каталог "bin" или каталог программы
func ProgramDir_bin() string {
Otvet := ""

2
vendor/modules.txt vendored
View File

@ -4,7 +4,7 @@ github.com/DataDog/zstd
# github.com/ManyakRus/logrus v0.0.0-20231019115155-9e6fede0d792
## explicit; go 1.13
github.com/ManyakRus/logrus
# github.com/ManyakRus/starter v1.0.67
# github.com/ManyakRus/starter v1.0.68
## explicit; go 1.22.0
github.com/ManyakRus/starter/config_main
github.com/ManyakRus/starter/contextmain