Closed Fishbubble closed 3 years ago
I can't test your code because you have common.GetWeek
in there, which I obviously don't have. Can you kindly provide a standalone reproducible sample?
I can't test your code because you have
common.GetWeek
in there, which I obviously don't have. Can you kindly provide a standalone reproducible sample?
Thank you for your reply! I'm sorry! common.GetWeek is cgo, because our company team code in different language.
/*
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int getweek(int time_stamp) {
time_t rawtime = time_stamp;
char buffer[128] = {0};
struct tm *timeinfo;
timeinfo = localtime(&rawtime);
strftime(buffer, sizeof(buffer), "%Y%U", timeinfo);
return atoi(buffer);
}
*/
import "C"
func GetWeek(in_time int64) int {
cw := C.getweek(C.int(in_time))
return int(cw)
}
Actually, the result is when increase loop count: failed!!! 2024.01.01 20:55:39 202400 202401 failed!!! 2024.01.02 20:55:39 202400 202401
@Fishbubble I added a slightly modified version of your test, and can't reproduce. This is on a MacOS 10.14.6
finch% git log -n 1
commit 1043fa0443fc3a688a98c374db181639e41b00f2 (HEAD -> topic/gh-issue-12, origin/topic/gh-issue-12)
Author: Daisuke Maki <lestrrat+github@gmail.com>
Date: Sat Feb 15 22:12:40 2020 +0900
use actual test
finch% go test -v .
=== RUN TestCombine
--- PASS: TestCombine (0.00s)
=== RUN TestExclusion
--- PASS: TestExclusion (0.00s)
=== RUN TestInvalid
--- PASS: TestInvalid (0.00s)
=== RUN TestFormat
--- PASS: TestFormat (0.00s)
=== RUN TestFormatBlanks
--- PASS: TestFormatBlanks (0.00s)
=== RUN TestFormatZeropad
--- PASS: TestFormatZeropad (0.00s)
=== RUN TestGHIssue5
--- PASS: TestGHIssue5 (0.00s)
=== RUN TestGHPR7
--- PASS: TestGHPR7 (0.00s)
=== RUN TestGHIssue9
--- PASS: TestGHIssue9 (0.00s)
=== RUN TestGHIssue12
--- PASS: TestGHIssue12 (0.00s)
=== RUN Example_CustomSpecifications
--- PASS: Example_CustomSpecifications (0.00s)
PASS
ok github.com/lestrrat-go/strftime (cached)
finch%
@Fishbubble Is this still a problem?
Closing, due to lack of activity
output: failed!!! 2021.01.01 00:35:27 202052 202100 failed!!! 2021.01.02 00:35:27 202052 202100