mirror of
https://github.com/open-webui/open-webui
synced 2025-04-07 06:04:50 +00:00
Merge pull request #10076 from crizCraig/local_date
fix: return local date from `getFormattedDate`
This commit is contained in:
commit
b0ad5cd863
@ -135,7 +135,6 @@ class SafeWebBaseLoader(WebBaseLoader):
|
||||
results = await self.fetch_all(urls)
|
||||
return self._unpack_fetch_results(results, urls, parser=parser)
|
||||
|
||||
|
||||
def lazy_load(self) -> Iterator[Document]:
|
||||
"""Lazy load text from the url(s) in web_path with error handling."""
|
||||
for path in self.web_paths:
|
||||
@ -194,5 +193,5 @@ def get_web_loader(
|
||||
verify_ssl=verify_ssl,
|
||||
requests_per_second=requests_per_second,
|
||||
continue_on_failure=True,
|
||||
trust_env=trust_env
|
||||
trust_env=trust_env,
|
||||
)
|
||||
|
@ -1000,7 +1000,10 @@ export const bestMatchingLanguage = (supportedLanguages, preferredLanguages, def
|
||||
// Get the date in the format YYYY-MM-DD
|
||||
export const getFormattedDate = () => {
|
||||
const date = new Date();
|
||||
return date.toISOString().split('T')[0];
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
};
|
||||
|
||||
// Get the time in the format HH:MM:SS
|
||||
|
Loading…
Reference in New Issue
Block a user