Skip to content

Commit

Permalink
debugging CI
Browse files Browse the repository at this point in the history
  • Loading branch information
giann committed Oct 7, 2023
1 parent 0f4bd76 commit a9d2098
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/067-time.buzz
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import "std";
import "time";
import "debug";

test "Time std lib" {
const now = DateTime.now();
Expand All @@ -20,13 +21,15 @@ test "Time std lib" {

const format = "The time is %Y-%m-%d %H:%M:%S";
const formatted = time.format(format);
print(formatted);
assert(
formatted == "The time is 2023-10-05 09:38:55",
message: "Could format time"
);

| assert(time.timestamp() == 1696491535, message: "Could use timestamp");

print("{now.timestamp()} > {time.timestamp() ? {now.timestamp() > time.timestamp()}}");
assert(now.timestamp() > time.timestamp());

| FIXME: weird error with localtime that will return null if fed a number and not the result of time
Expand All @@ -35,6 +38,7 @@ test "Time std lib" {
| dump(recreated);

const recreated = DateTime.parse(formatted, format: format);
dump(recreated);

assert(
recreated.monthDay == time.monthDay
Expand Down

0 comments on commit a9d2098

Please sign in to comment.