一些补丁只是提供
317c317
< global $wgScript, $wgUser, $wgParser, $wgTitle, $wgOut;
---
> global $wgScript, $wgUser, $wgParser, $wgTitle, $wgOut, $wgLocalTZoffset;
370c370,371
< $output .= "<div class='news-bulletin-time'>" . date("M j, Y g:i a",strtotime($row->cl_timestamp)) . "</div>";
---
> //Patched to display correct time in current time zone
> $output .= "<div class='news-bulletin-time'>" . date("M j, Y g:i a",strtotime($row->cl_timestamp) + ($wgLocalTZoffset * 60)) . "</div>";
如何打补丁?
最佳答案
只需使用 patch
工具,以及您的文件。
patch original.txt diffs.patch
这成立,如果 diffs.patch
是由 diff
生成的补丁,没有额外的参数(你的例子似乎是)。例如,如果你有一个统一的差异(diff -u
),你必须通过传递适当的标志(-u
)来告诉 patch
> 用于统一差异)。
关于linux - 我应该如何应用这种类型的补丁?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10123133/