Skip to content

Commit 1d62bd6

Browse files
committed
add fmt localtime
1 parent bb2a5bf commit 1d62bd6

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tutorials/migrate-v5.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,16 @@ listener.cancel();
159159

160160
When rewriting your own code that used `Task`, you can forget about checking for cancellation and leverage the power of coroutines - your task can be cancelled at any `co_await` point.
161161

162+
## `fmt::localtime`
163+
164+
We updated our `fmt` dependency to v12, which removed the `fmt::localtime` function. Now Geode provides a drop-in replacement for it:
165+
```cpp
166+
#include <Geode/utils/general.hpp>
167+
168+
std::time_t time = std::time(nullptr);
169+
std::tm local = geode::localtime(time);
170+
```
171+
162172
## Changes to `std::function` arguments
163173

164174
Almost all parts of geode that accepted a `std::function` (such as `queueInMainThread`, `TextInput::setCallback`, etc.) have been changed to use `geode::Function` instead. The primary difference is that a `geode::Function` cannot be copied, only moved. Most proper usages should still compile and work properly, but if you have errors that are related to `std::function`, try adding `std::move`s or making sure to explicitly use `geode::Function` everywhere.

0 commit comments

Comments
 (0)