mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	timerender: Respect the user’s language setting in get_tz_with_UTC_offset.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							100f91e1c9
						
					
				
				
					commit
					581092a964
				
			@@ -112,7 +112,7 @@ export function get_localized_date_or_time_for_format(
 | 
			
		||||
// Exported for tests only.
 | 
			
		||||
export function get_tz_with_UTC_offset(time: number | Date): string {
 | 
			
		||||
    const tz_offset = format(time, "xxx");
 | 
			
		||||
    let timezone = new Intl.DateTimeFormat(undefined, {timeZoneName: "short"})
 | 
			
		||||
    let timezone = new Intl.DateTimeFormat(user_settings.default_language, {timeZoneName: "short"})
 | 
			
		||||
        .formatToParts(time)
 | 
			
		||||
        .find(({type}) => type === "timeZoneName")?.value;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user