Fixed timestamp timezone for entry id's

This commit is contained in:
Niels Geens
2025-01-02 16:52:43 +01:00
parent e0bc7a7159
commit 6669b7a682
4 changed files with 10 additions and 5820 deletions

View File

@@ -46,4 +46,4 @@ COPY ./ /root/sia/
COPY --from=web-build /app/dist /root/sia/static/ COPY --from=web-build /app/dist /root/sia/static/
WORKDIR /root/sia WORKDIR /root/sia
ENTRYPOINT ["python3", "-m", "sia"] CMD ["python3", "-m", "sia"]

View File

@@ -154,7 +154,7 @@ class WebAgent(BaseAgent):
if llm_name not in self._llms: if llm_name not in self._llms:
raise ValueError(f"Unknown LLM: {llm_name}") raise ValueError(f"Unknown LLM: {llm_name}")
timestamp = datetime.now() timestamp = datetime.now(datetime.timezone.utc)
self._iteration_logger.log_iteration(timestamp, self._context, response) self._iteration_logger.log_iteration(timestamp, self._context, response)
parse_result = self._parser.parse(timestamp, response) parse_result = self._parser.parse(timestamp, response)
if isinstance(parse_result, Command): if isinstance(parse_result, Command):

File diff suppressed because one or more lines are too long

View File

@@ -74,13 +74,14 @@ export const MemoryEditor = ({
const generateId = () => { const generateId = () => {
const now = new Date(); const now = new Date();
return now.getFullYear() + const utc = new Date(now.getTime() + now.getTimezoneOffset() * 60000);
String(now.getMonth() + 1).padStart(2, '0') + return utc.getFullYear() +
String(now.getDate()).padStart(2, '0') + '_' + String(utc.getMonth() + 1).padStart(2, '0') +
String(now.getHours()).padStart(2, '0') + String(utc.getDate()).padStart(2, '0') + '_' +
String(now.getMinutes()).padStart(2, '0') + String(utc.getHours()).padStart(2, '0') +
String(now.getSeconds()).padStart(2, '0') + '_' + String(utc.getMinutes()).padStart(2, '0') +
String(now.getMilliseconds()).padStart(3, '0'); String(utc.getSeconds()).padStart(2, '0') + '_' +
String(utc.getMilliseconds()).padStart(3, '0');
}; };
const getInitialEntry = (type) => { const getInitialEntry = (type) => {