Changeset 3651
- Timestamp:
- 01/04/2011 12:42:42 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-templatetags.php
r3635 r3651 834 834 } 835 835 836 function bp_format_time( $time, $just_date = false ) {837 if ( ! $time)836 function bp_format_time( $time, $just_date = false, $localize_time = true ) { 837 if ( !isset( $time ) || !is_numeric( $time ) ) 838 838 return false; 839 839 840 840 // Get GMT offset from root blog 841 $root_blog_offset = get_blog_option( BP_ROOT_BLOG, 'gmt_offset' ); 841 $root_blog_offset = false; 842 if ( $localize_time ) 843 $root_blog_offset = get_blog_option( BP_ROOT_BLOG, 'gmt_offset' ); 842 844 843 845 // Calculate offset time … … 850 852 if ( !$just_date ) { 851 853 // Current time (9:50pm) 852 $time = date_i18n( ' g:ia', $time_offset );854 $time = date_i18n( get_option( 'time_format' ), $time_offset ); 853 855 854 856 // Return string formatted with date and time -
trunk/bp-xprofile/bp-xprofile-filters.php
r3560 r3651 102 102 103 103 if ( 'datebox' == $field_type ) 104 $field_value = bp_format_time( $field_value, true );104 $field_value = bp_format_time( $field_value, true, false ); 105 105 else 106 106 $field_value = str_replace(']]>', ']]>', $field_value );
Note: See TracChangeset
for help on using the changeset viewer.